Component | +--Control | +--DateTimePickerpublic class DateTimePicker
Implements a date and time picker control.
Constructors
Name | Description |
---|---|
DateTimePicker() | Creates a DateTimePicker. |
Methods
Name | Description |
---|---|
addOnCloseUp(EventHandler value) | Adds a new listener to the CloseUp event. |
addOnDropDown(EventHandler value) | Adds a new listener to the DropDown event. |
addOnFormat(DateTimeFormatEventHandler value) | Adds a new listener to the Format event. |
addOnFormatQuery( DateTimeFormatQueryEventHandler value) | Adds a new listener to the FormatQuery event. |
addOnUserString(DateTimeUserStringEventHandler value) | Adds a new listener to the UserString event. |
addOnValueChange(DateTimeChangeEventHandler value) | Adds a new listener to the DateTimeChange event. |
addOnWmKeyDown(DateTimeWmKeyDownEventHandler value) | Adds a new listener to the WmKeyDown event. |
createHandle() | Creates the physical window handle. |
destroyHandle() | Destroys the physical window handle. |
getAppCanParse() | Returns the current value of the AppCanParse property. |
getCalendarBackColor() | Returns the current value of the CalendarBackColor property. |
getCalendarFont() | Returns the current value of the CalendarFont property. |
getCalendarForeColor() | Returns the current value of the CalendarForeColor property. |
getCalendarMonthBackground() | Returns the current value of the CalendarMonthBackground property. |
getCalendarTitleBackColor() | Returns the current value of the CalendarTitleBackColor property. |
getCalendarTitleForeColor() | Returns the current value of the CalendarTitleForeColor property. |
getCalendarTrailingForeColor() | Returns the current value of the CalendarTrailingForeColor property. |
getCreateParams() | Returns the CreateParams used to create this window. |
getCustomFormat() | Returns the custom format. |
getFormat() | Returns the current value of the format property. |
getMaxDate() | Returns the maximum date selectable in the control. |
getMinDate() | Returns the minimum date selectable in the control. |
getRightAlign() | Returns the current value of the RightAlign property. |
getShowNone() | Returns the current value of the ShowNone property. |
getUpDown() | Returns the current value of the UpDown property. |
getValue() | Return the current value displayed in the control. |
hasDefaultText() | Determines if the control contains the default text. |
onCloseUp(Event event) | Occurs when the drop-down calendar is dismissed and disappears. |
onDropDown(Event event) | Occurs when the drop-down calendar is shown. |
onFormat(DateTimeFormatEvent event) | Occurs when the DateTimePicker needs to convert the time value to a string format. |
onFormatQuery(DateTimeFormatQueryEvent event) | Occurs when the DateTimePicker needs to determine the dimensions of the string that would be displayed for a given value. |
onUserString(DateTimeUserStringEvent event) | Occurs when the user has finished entering a string in the control. |
onValueChange(DateTimeChangeEvent event) | Occurs when the value for the control changes. |
onWmKeyDown(DateTimeWmKeyDownEvent event) | Occurs when the user presses a key in a custom format field. |
removeOnCloseUp(EventHandler value) | Removes a listener of the CloseUp event. |
removeOnDropDown(EventHandler value) | Removes a listener of the DropDown event. |
removeOnFormat(DateTimeFormatEventHandler value) | Removes a listener of the Format event. |
removeOnFormatQuery( DateTimeFormatQueryEventHandler value) | Removes a listener of the FormatQuery event. |
removeOnUserString( DateTimeUserStringEventHandler value) | Removes a listener of the UserString event. |
removeOnValueChange(DateTimeChangeEventHandler value) | Removes a listener of the ValueChange event. |
removeOnWmKeyDown( DateTimeWmKeyDownEventHandler value) | Removes a listener of the WmKeyDown event. |
setAppCanParse(boolean b) | Sets the AppCanParse property. |
setCalendarBackColor(Color value) | Sets the CalendarBackColor property. |
setCalendarFont(Font font) | Sets the CalendarFont. |
setCalendarForeColor(Color value) | Sets the CalendarForeColor property. |
setCalendarMonthBackground(Color value) | Sets the CalendarMonthBackground. |
setCalendarTitleBackColor(Color value) | Sets the CalendarTitleBackColor property. |
setCalendarTitleForeColor(Color value) | Sets the CalendarTitleForeColor property. |
setCalendarTrailingForeColor(Color value) | Sets the CalendarTrailingForeColor. |
setCustomFormat(String sz) | Sets the custom format used when the format mode for the control is CUSTOM. |
setFormat(int format) | Sets the format mode for the control. |
setMaxDate(long date) | Sets the Maximum displayable date for the control. |
setMinDate(long date) | Sets the Minimum displayable date for the control. |
setRightAlign(boolean b) | Sets the RightAlign property. |
setShowNone(boolean b) | Sets the ShowNone property. |
setUpDown(boolean b) | Sets the UpDown property. |
setValue(long time) | Sets the value displayed in the control. |
Creates a DateTimePicker.
Adds a new listener to the CloseUp event.
Adds a new listener to the DropDown event.
Adds a new listener to the Format event.
Adds a new listener to the FormatQuery event.
Adds a new listener to the UserString event.
Adds a new listener to the DateTimeChange event.
Adds a new listener to the WmKeyDown event.
Creates the physical window handle.
createHandle() in Control.
Destroys the physical window handle.
destroyHandle() in Control.
Returns the current AppCanParse value.
Returns the current value of the AppCanParse property.
Returns the Current CalendarBackColor.
Returns the current value of the CalendarBackColor property.
Returns the current CalendarFont.
Returns the current value of the CalendarFont property.
Returns the current CalendarForeColor.
Returns the current value of the CalendarForeColor property.
Returns the current CalendarMonthBackground.
Returns the current value of the CalendarMonthBackground property.
Returns the current CalendarTitleBackColor.
Returns the current value of the CalendarTitleBackColor property.
Returns the current CalendarTitleForeColor.
Returns the current value of the CalendarTitleForeColor property.
Returns the current CalendarTrailingForeColor.
Returns the current value of the CalendarTrailingForeColor property.
Returns the CreateParams.
Returns the CreateParams used to create this window.
getCreateParams() in Control.
Returns the custom format string.
Returns the custom format.
Returns the current value of the format property. This determines the style of format the date is displayed in.
Returns the maximum allowed date.
Returns the maximum date selectable in the control. A -1 is returned if there is no maximum value.
Returns the minimum allowed date.
Returns the minimum date selectable in the control. A -1 is returned if there is no minimum value.
Returns the current value of the RightAlign property.
Returns the current value of the RightAlign property.
Returns the current value of the ShowNone property.
Returns the current value of the ShowNone property.
Returns the current value of the UpDown property.
Returns the current value of the UpDown property.
Returns the current value.
Return the current value displayed in the control. A -1 is returned if there is no value selected.
Determines if the control contains the default text.
Occurs when the drop-down calendar is dismissed and disappears.
Occurs when the drop-down calendar is shown.
Occurs when the DateTimePicker needs to convert the time value to a string format.
Occurs when the DateTimePicker needs to determine the dimensions of the string that would be displayed for a given value.
Occurs when the user has finished entering a string in the control. This event will be fired only if AppCanParse is set to true.
Occurs when the value for the control changes.
Occurs when the user presses a key in a custom format field.
Removes a listener of the CloseUp event.
Removes a listener of the DropDown event.
Removes a listener of the Format event.
Removes a listener of the FormatQuery event.
Removes a listener of the UserString event.
Removes a listener of the ValueChange event.
Removes a listener of the WmKeyDown event.
Sets the AppCanParse property. When set to true, the user can edit the value in the control by pressing F2. When the user has finished editing, the UserString event occurs, and the control user can interpret the userstring.
Sets the CalendarBackColor property. This color is displayed between the months on the calendar.
Sets the CalendarFont. The calendar font is used to display text on the pop-up calendar.
Sets the CalendarForeColor property. This color is used to display text within the month.
Sets the CalendarMonthBackground. This color is used to display the background within the month.
Sets the CalendarTitleBackColor property. This color is used as the background for the calendar's title.
Sets the CalendarTitleForeColor property. This color is used to display the text in the calendar's title.
Sets the CalendarTrailingForeColor. This color is used to display the text for the header and trailing day text. Header and trailing days are the days from the previous and following months that appear on the current month's calendar.
Sets the custom format used when the format mode for the control is CUSTOM.
Sets the format mode for the control. Valid values are:
cor.comctl.DateTimePicker.Formats.LONG cor.comctl.DateTimePicker.Formats.SHORT cor.comctl.DateTimePicker.Formats.TIME cor.comctl.DateTimePicker.Formats.CUSTOM
Sets the Maximum displayable date for the control. There is no maximum value if Maximum is set to -1.
Sets the Minimum displayable date for the control. There is no minimum value if Minimum is set to -1.
Sets the RightAlign property. When RightAlign is set to true, the text in the control is right aligned.
Sets the ShowNone property. When ShowNone is set to true a checkbox is displayed to the left of the date in the control. When the checkbox is unchecked the value of the control is -1 indicating no date is selected.
Sets the UpDown property. If UpDown is set to true, a spin control is used to adjust time values instead of the drop-down calendar.
Sets the value displayed in the control. Setting the value to -1 has the effect of selecting a null date. Null dates are allowed only if ShowNone is set to true.