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
Form Data:
{}
Field Properties
Name | Description | Type |
---|---|---|
format | Format of the date when rendered in the input(s). Defaults to localized format based on the used views. | string |
views | The view to show in the corresponding datepicker mode (i.e., "year", "month", "day", etc). Defaults to undefined | string |
timeSteps | The 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 time | Object |
displayType | The type of control, which defines how the input is presented (e.g., "date", "time", "datetime", etc.). | string |
displayName | The display name of the control, shown as a label or header. | string |
disabled | A boolean indicating if the control is disabled. | boolean |
readOnly | A 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:
Property | Description |
---|---|
required | Boolean value that specifies whether entering data into the field is mandatory. |
minLength | Specifies the minimum number of characters allowed in the input. |
maxLength | Specifies the maximum number of characters allowed in the input. |
min | Specifies the minimum value allowed for number inputs, with support for dynamic values. |
max | Specifies the maximum value allowed for number inputs, also supporting dynamic conditions. |
pattern | A regex pattern that the input must match to be considered valid. |
validate | A function for custom validation logic, which can return a boolean or an error message. |
matchIsValidTel | Boolean value that specifies whether or not to validate the input as a phone number. |