Date Time Picker¶
The date time picker allows the user to select a date and time from a drop down calendar. This control is generated for fields with datatype date, time, or timestamp.
Figure 1 - Date Time Picker - Date
Figure 2 - Date Time Picker - Time
Figure 3 - Date Time Picker - Date and Time
Figure 4 - Date Time Picker - Long Time
Figure 5- Date Time Picker - Timezone Supported
Variations¶
The date time picker control is a variant of the Field.
When to use¶
The control will be generated in the client based on the data type.
How to use¶
Add a Field to the client file, the control will be generated according to the data type. If needed change the relevant properties
field <field_name> {
//Properties
format = longtime; //For attributes with data type TIME
}
Today / Now¶
If the Entity is timezone aware then the display of Today/Now values in the date/time picker will be done based on the client's timezone as defined in the "Account Settings > Timezone" section.
Figure 6- Account Settings - Client Timezone
For entities that are not timezone aware Today/Now values will be selected based on Browser Timezone.
Date/Time Handling for Timezone Aware Entities¶
Requirement: Entity should be timezone aware.
Feature: If an entity is time zone-aware, a dropdown menu for timezone selection will appear alongside the date/time picker, enabling users to choose a specific time zone for inputting date/time values. Once the user enters a date/time value with a selected time zone from the dropdown and applies it to the date/time field, the value will be converted to their working timezone and displayed accordingly.
Figure 7- Date/Time Picker for Timezone Aware Entities
Note: If the entity is not timezone-aware, the date/time picker will not include the timezone selection dropdown menu.
Limitations¶
None.
Keywords¶
None.
Properties¶
Below is a list of properties that can be used to customize the control.
editable | format | label | size | visible
Example¶
Consider the following code snippet from an entity:
//Example code - List of attributes in entity
//-------------------------------------------
private LateStart TIMESTAMP A-IU-;
public AccountingDate DATE A-IU-;
public CreatedTime TIME A-IU-;
Based on the data type the appropriate control will be generated as outlined in the introduction.