Datepicker
This page describes the properties of the Datepicker widget which can be used to display or capture date/time information. It enables to filter the data based on a date range, format dates and performs date validations.
Content properties
These properties are customizable options present in the property pane of the widget, allowing users to modify the widget according to their preferences.
Data
Date format ISO 8601 date string
Displays a list of date formats for the Datepicker widget. With JS enabled, this property accepts ISO 8601 date string formats.
You can also use the built-in Moment.js library in Appsmith to parse the date in the format required.
Example: If you want to convert the selected date and time to the IST timezone (Asia/Kolkata), click the JS button and add the following code:
{{
moment(datePickerName.selectedDate).tz("Asia/Kolkata").format()
}}
Default date ISO 8601 date string
Sets a default date that would be captured as user input unless it is changed by the user. With JS enabled, this property accepts ISO 8601 date string values.
First day of the week number
Sets which day of the week appears first within the calendar of the Datepicker's menu.
Time precision string
Decides whether a time is included within the Datepicker, and whether that time is to the minute or second precision. With JS enabled, it accepts the follwoing values - None
, minute
, or second
.