DateControl Xojo Plugin

DateControl Control

DateControl is a date selection control.

This variation of the control is for old style Xojo Window class.

Note:
The control uses native date selectors, or native theme rendering on some platforms and therefore the limitations and look and feel will depend on the Target operating system.


Drop down modes shown on macOS Mojave in dark mode.


DateControl shown macOS X El Capitan (top), Ubuntu Linux (2nd from top), Raspberry PI (3rd from top), Windows 10 native mode, (top right), Windows 7 native mode (bottom right) and OS X El Capitan in drop down mode on bottom left.


Drop down modes shown on Ubuntu Dark mode with empty date support turned on and Mint Dark mode with empty date support turned off.


Drop down modes shown on Raspberry PI (Empty date support turned on).


Custom drop down mode used on Windows systems.

RectControl
   DateControl

control DateControl

Properties

AllowFocusRingIf set to true then Focus ring is drawn.
CheckedWhen the control is set to be able to represent empty dates then setting this property to true will mean that the date is not empty. In same way then setting it to false will mean the date is empty.
DateFormatDefines the display format of the date.
DateValueUse this property to set or get the date of the control.
DayUse this property to set or get the Day value of the control.
DebugDataSizeUsed for internal quality control of the plugin.
DropDownIconSets the DropDownIcon for the drop down calendar mode on macOS and Linux systems. (On Windows this does nothing since the Windows control is native control that does not use icon). This property supports retina enabled Image sets.
DropDownIconDMSets the DropDownIcon for the drop down calendar mode on macOS and Linux systems when in dark mode. (On Windows this does nothing since the Windows control is native control that does not use icon). This property supports retina enabled Image sets.
EmptyDatesSet this property to true if the control should be able to represent empty dates.
Enabled (Inherited) Determines if the control should be enabled when the owning window is opened.
Handle (Inherited) Returns a handle to the control.
HasBorderIf set to false then border on the control is skipped.
Height (Inherited) The height (in points) of the control.
Index (Inherited) If the control is used in a control set, this specifies the control's index in the set.
Left (Inherited) The left side of the control in local coordinates (relative to the window)
LinuxDropDownModeIf set to true then drop down mode is enabled on Linux systems.
LinuxFontBoldUse this property to determine if the font on Linux targets should be bold faced.
LinuxTextFontUse this property to determine the font on Linux Targets.
LinuxTextSizeUse this property to determine the font size on Linux Targets.
LinuxTextUnitSets the unit of the FontSize.
MacFontBoldUse this property to determine if the font on MacOS targets should be bold faced.
MacHideBackgroundIf set to true then background is hidden on t he control, this also includes the border regardless of the setting of the HasBorder property.
MacTextFontUse this property to determine the font on MacOS Targets.
MacTextSizeUse this property to determine the font size on MacOS Targets.
MaxDateValueSets or gets the maximum date allowed to be entered in the DateControl.
MinDateValueSets or gets the minimum date allowed to be entered in the DateControl.
MonthUse this property to set or get the Month value of the control.
MouseX (Inherited) The X coordinate of the mouse (points). Measured from the top-left corner of the window.
MouseY (Inherited) The Y coordinate of the mouse (points). Measured from the top-left corner of the window.
OSXDropDownModeIf set to true then drop down mode is enabled on OS X systems.
PanelIndex (Inherited) If the control has been placed on a TabPanel or PagePanel control, this is the panel (page/tab) that the control is on. If the control is not on a panel, it returns -1.
Top (Inherited) The top of the control in local coordinates (relative to the window).
Visible (Inherited) Determines whether the control is visible when its owning window is opened. The default is True: the control is visible.
Width (Inherited) The width (in points) of the control.
WinCustomDownModeIf set as true then the Windows drop down calendar will be custom made Einhugur one instead of the native Windows calendar.
WinFontBoldUse this property to determine if the font on Windows targets should be bold faced.
WinTextFontUse this property to determine the font on Windows Targets.
WinTextSizeUse this property to determine the font size on Windows Targets.
WinTextUnitSets the unit of the FontSize.
Window (Inherited) The control's parent window.
YearUse this property to set or get the Year value of the control.

Methods

Close (Inherited) Closes a control.
ReloadEventsReloads events if having used AddHandler to subscribe events.
SetFocusUse this method to manually give the control focus.

Events

Close (Inherited) The control is about to close.
ConstructContextualMenu (Inherited) This event is called when it is appropriate to display a contextual menu for the control.
ContextualMenuItemSelected (Inherited) Fires when a contextual menuitem selectedItem was selected but the MenuItemSelected event and the MenuHandler for the MenuItem did not handle the menu selection.
CustomizeLocalizationUse this event to put custom localization for the OS X drop down calendar. If this event is not used then the calendar is automatically localized using system locale.
DragEnter (Inherited) Fires when the passed DragItem enters the RectControl.
DragExit (Inherited) Fires when the passed DragItem exits the RectControl.
DragOver (Inherited) Fires when the DragItem is over the RectControl.
DropObject (Inherited) The item represented by Obj has been dropped on the control.
GotFocusThis event is fired when a the control gets the input focus.
KeyDownThe user has pressed the Key passed while the DateControl has the focus.
KeyUp (Inherited) Fires when the passed Key is released in the control that has the focus.
LostFocusThis event is fired when a the control looses the input focus.
MacMouseDownThis event is fired when a when the Mouse goes down on the control. This event is only fired on MacOS Targets.
MouseDrag (Inherited) The mouse button was pressed inside the control and moved (dragged) at the location local to the control passed in to x, y. The user has moved the mouse inside the control while the mouse button is held down. This event handler receives parameters that indicate where the mouse is in coordinates local to the control.
MouseEnter (Inherited) The mouse has entered the area of the control.
MouseExit (Inherited) The mouse has left the area of the control.
MouseMove (Inherited) The mouse has moved within the control to the coordinates passed. The coordinates are local to the control, not to the window.
MouseWheel (Inherited) The mouse wheel has been moved.
ValueChangedThis event is fired when a portion or all of the date changes in the control.

Enumerations

DateFormatsEnum to be used with the DateFormat property.

Constants

Version = 11.1

Examples

The control supports dark mode on windows systems only up to a point. There is currently no way to Theme the Windows native control to dark. (Same issue as Xojo them self’s battles with in their Date picker). The date control can currently only put thee custom drop down window in dark mode under Windows systems.

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit