Skip to main content

Date Picker

The Date picker component can be used to select a date or time or both date and time from the user.

Examples

A simple date picker with required validation
Please enter birthday

Form Data:
{}

Field Properties

NameDescriptionType
formatFormat of the date when rendered in the input(s). Defaults to localized format based on the used views.string
viewsThe view to show in the corresponding datepicker mode (i.e., "year", "month", "day", etc). Defaults to undefinedstring
timeStepsThe time steps between two time unit options. For example, if timeStep.minutes = 8, then the available minute options will be [0, 8, 16, 24, 32, 40, 48, 56]. Only applicable to displayTypes: datetime and timeObject
displayTypeThe type of control, which defines how the input is presented (e.g., "date", "time", "datetime", etc.).string
displayNameThe display name of the control, shown as a label or header.string
disabledA boolean indicating if the control is disabled.boolean
readOnlyA boolean indicating if the control is readonly.boolean

Field Properties - Validation Details

The validation settings within the Textarea component are crucial for ensuring that user input meets specific requirements. Here’s a breakdown of the available validation properties:

PropertyDescription
requiredBoolean value that specifies whether entering data into the field is mandatory.
minLengthSpecifies the minimum number of characters allowed in the input.
maxLengthSpecifies the maximum number of characters allowed in the input.
minSpecifies the minimum value allowed for number inputs, with support for dynamic values.
maxSpecifies the maximum value allowed for number inputs, also supporting dynamic conditions.
patternA regex pattern that the input must match to be considered valid.
validateA function for custom validation logic, which can return a boolean or an error message.
matchIsValidTelBoolean value that specifies whether or not to validate the input as a phone number.