DateTime Box¶
The DateTime Box widget in Emakin allows users to select a date, time, or both, offering flexibility in date and time format handling. It is well-suited for applications requiring date and time-specific data input, such as scheduling, event management, and time-bound data entry.
Data Format¶
Internally, the widget stores date and time values using the ISO 8601 standard. However, the display format can be customized using the Format
property, with the following options:
DateTime
: Displays both date and time (e.g.,2018-02-04T15:00:00+05:00
).Date
: Displays only the date (e.g.,2024-12-18
).Time
: Displays only the time (e.g.,15:00:00
).
Relative Date Display¶
For improved user experience, non-literal date fields are displayed as relative dates (e.g., "3 days ago," "5 hours later").
To enforce a literal date display (e.g., dd/MM/yyyy
or MM/dd/yyyy
), set the IsLiteral
property to true
.
Date Range Functionality¶
The DateTime Box widget supports date range selection. To enable this feature, specify the XPath of the end date field using the EndXPath
property. This allows users to select a start and end date/time.