Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - DateTime Picker

Component Palette Icon:

Description​

The DateTime Picker component uses the calendar to select the date and time. You can choose the "pickerType" to set both date and time, or just date. Configure the date and time format in the Property Editor using the formattedValue property. To use the DateTime Picker, select the month, date, and time on the component.

The DateTime Picker component has two pre-configured variants:

  • Date and Time - Enables users can select a date and time on a calendar.
  • Date - Enables users can select a date on a calendar.

User Interface​

InteractionDescription
AM/PMAllows users to toggle between AM or PM.
Day SelectorAllows users to choose a specific day.
Month SelectorAllows users to choose a specific month.
Time SelectorAllows users to choose a specific time.
Year SelectorAllows users to choose a specific year.

Properties​

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
valueCurrent date/time as a Date object or timestamp in milliseconds.value: dropdown
formattedValueDate and time in configured format.value: string
pickerTypeWhether to display and enable picker for date only or for both date and time.value: string
minDateMinimum date/time as a Date object or timestamp in milliseconds. If null, the minimum date is 10 years in the past from today.value: string
maxDateMaximum date/time as a Date object or timestamp in milliseconds. If null, the minimum date is 10 years in the future from today.value: string
formatTemplate for formatting date display - must be valid moment.js format, e.g., 'MM/DD/YYYY h:mm a'.value: string
localeCode for localization of language and formatting. Use the dropdown to select language.value: string
enabled'False' will disable any interaction with the calendar.

Note: If the component is disabled, scripts can still run on the component. For example, if you add a script action to the onClick event, the script will fire when the user clicks on the DateTime Picker.
value: boolean
styleSets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object

Component Scripts and Events​

Further component interaction and functionality can be configured for all components through scripting and event actions. Right-click on the component or select Components from the Designer menubar to access the configuration popups for both of these options:

  • Configure Events: Accesses the Event Configuration popup where you can configure actions to run in response to events to make the component dynamic. The Events Configurations page shows how to configure events and actions on a Perspective component.

  • Configure Scripts: Accesses the Script Configuration popup where custom methods and message handlers can be added. The Scripting in Perspective section details scripting fundamentals, creating custom methods, and using message handlers.

Example​

PropertyValueStyle Category
props.formatMM/DD/YY hh:mm:ss aN/A
props.style.borderStylesolidborder
props.style.borderWidth1pxborder
props.style.borderColor#D90000border