jsx3.util.DateFormat class to both format and parse dates. Dates are formatted
before they are displayed in the text box of the date picker. Dates are parsed after a user manually changes the
text in the text box. Parsing with DateFormat is fairly strict. If parsing fails, the value of
the date picker is unchanged and the displayed value refreshes.
The calendar calculates dates in the time of the local machine, not UTC (Greenwich Mean Time). Date values chosen
with the calendar are always 0h:00m local time.
Date pickers publish the following model events:
CHANGE — when the value of the control is changed by the user selecting a date in the
calendar or editing the formatted date in the text box.SHOW — whenever the calendar is shown.HIDE — whenever the calendar is hidden.| Field Summary | |
|---|---|
| static String | Deprecated. This value is now localized.
|
| static int | Deprecated. This value is now localized.
|
| Constructor Summary | |
|---|---|
| void | init(strName : String, intLeft : int | String, intTop : int | String, intWidth : int | String, intHeight : int | String) The instance initializer. |
| Method Summary | |
|---|---|
| boolean | This method can be overridden on an instance of a DatePicker to control which dates are selectable in the
calendar popup. |
| int | Returns STATEVALID if this date picker is not required or if it is required and its value is not
null, otherwise returns STATEINVALID. |
| void | Shows the calendar for this date picker and places focus within the calendar as though the user had clicked
on the show calendar button. |
| Date | getDate() Returns the current value of this form field as a JavaScript Date object. |
| String | Returns the text label to show in this date picker when no date is selected. |
| int | Returns the jsxfirstweekday field |
| String | int | Returns the jsxformat field |
| String | Returns the URL to use for the clickable image that triggers the calendar to display. |
| String | getValue() Returns the value of this form field (the string displayed in the text box). |
| String | paint() |
| void | Set the date value of this form field |
| void | setDefaultText(label : String) Sets the text label to show in this date picker when no date is selected. |
| void | setFirstDayOfWeek(jsxfirstweekday : int) Sets the jsxfirstweekday field |
| void | Sets the format of this date picker. |
| void | Sets the URL to use for the clickable image that triggers the calendar to display. |
| jsx3.gui.DatePicker | Sets the value of this date picker. |
| Methods Inherited From jsx3.gui.Form |
|---|
| doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState |
| Methods Inherited From jsx3.gui.Interactive |
|---|
| doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy |
| Methods Inherited From jsx3.gui.Painted |
|---|
| focus, getAbsolutePosition, getAttribute, getAttributes, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute |
| Methods Inherited From jsx3.util.EventDispatcher |
|---|
| publish, subscribe, unsubscribe, unsubscribeAll |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
| Field Detail |
|---|
| Constructor Detail |
|---|
| Method Detail |
|---|
true.
STATEVALID if this date picker is not required or if it is required and its value is not
null, otherwise returns STATEINVALID.Date object.jsx3.util.DateFormat.
The provided format may also be an integer, in which case it is intepreted as one of of the fields of
DateFormat - SHORT, MEDIUM, LONG, or FULL - and
the displayed format will be localized accordingly.