Date field
Display type
- date
Basic example
Schema:
"root"}
:
{1 Items"fields"]
:
[1 Items0}
:
{2 Items"name"
:
string
"dob"
"meta"}
:
{2 Items"displayName"
:
string
"Your DOB"
"displayType"
:
string
"date"
Properties
Name | Description | Type |
---|---|---|
config | Contains date configuration | Object |
placeholder | The hint shown in the text field | String |
isReadonly | A readonly field is not editable and value cannot be changed | Boolean |
isDisabled | Shows the field as disabled. This is also not editable and value cannot be changed | Boolean |
variant | Contains the field variant to be used. Allowed values: standard, filled, outlined. Default is standard. |
Config
Name | Description | Values | Example |
---|---|---|---|
views | Calendar views | year, month, day | - ["year"] - ["year", "month"] - ["year", "month", "day"] |
inputFormat | Date input format | All default values supported by javascript. | dd/MM/yyyy |
Common field properties
These are the common properties of a field ( inside meta
field)
Field | Data type | Default Value | Description |
---|---|---|---|
className | String | None | Pass classname for custom styling or reference |
displayName | String | None | It is used to display name of the field in the form |
displayType | String | None | It is used to determine the field type to be displayed. Read more |
displayProps | Object | None | It is used for field layouting. Refer for details: Display props |
htmlProps | Object | None | It is used for setting native html attributes to basic form controls like text_field, select, number, password, email etc. Example of such attributes would be like step , min , max for displayType number |
value | String Boolean Number | None | It is value of the field |
type | String | None | Used for hidden fields and field section. Value for hidden field: hidden . Value for section: section |
validation | Object | For field validation | |
dependencies | Object | Defines relationships and dependencies between various fields. Refer here for details: Dependencies | |
events | Object | Defines field level events |
Min. allowed date
Schema:
"root"}
:
{1 Items"fields"]
:
[1 Items0}
:
{2 Items"name"
:
string
"dob"
"meta"}
:
{3 Items"displayName"
:
string
"Your DOB"
"displayType"
:
string
"date"
"validation"}
:
{1 Items"min"
:
string
"2010/12/12"
Max. allowed date
Schema:
"root"}
:
{1 Items"fields"]
:
[1 Items0}
:
{2 Items"name"
:
string
"dob"
"meta"}
:
{3 Items"displayName"
:
string
"Your DOB"
"displayType"
:
string
"date"
"validation"}
:
{1 Items"max"
:
string
"2010/12/12"