Fields
Date Field

Date field

Display type

  • date

Basic example

Schema:

"root"
:
{1 Items
"fields"
:
[1 Items
0
:
{2 Items
"name"
:
string
"dob"
"meta"
:
{2 Items
"displayName"
:
string
"Your DOB"
"displayType"
:
string
"date"
}
}
]
}

Properties

NameDescriptionType
configContains date configurationObject
placeholderThe hint shown in the text fieldString
isReadonlyA readonly field is not editable and value cannot be changedBoolean
isDisabledShows the field as disabled.
This is also not editable and value cannot be changed
Boolean
variantContains the field variant to be used.
Allowed values: standard, filled, outlined. Default is standard.

Config

NameDescriptionValuesExample
viewsCalendar viewsyear, month, day- ["year"]
- ["year", "month"]
- ["year", "month", "day"]
inputFormatDate input formatAll default values supported by javascript.dd/MM/yyyy

Common field properties

These are the common properties of a field ( inside meta field)

FieldData typeDefault ValueDescription
classNameStringNonePass classname for custom styling or reference
displayNameStringNoneIt is used to display name of the field in the form
displayTypeStringNoneIt is used to determine the field type to be displayed. Read more
displayPropsObjectNoneIt is used for field layouting. Refer for details: Display props
htmlPropsObjectNoneIt 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
valueString
Boolean
Number
NoneIt is value of the field
typeStringNoneUsed for hidden fields and field section.
Value for hidden field: hidden.
Value for section: section
validationObjectFor field validation
dependenciesObjectDefines relationships and dependencies between various fields. Refer here for details: Dependencies
eventsObjectDefines field level events

Min. allowed date

Schema:

"root"
:
{1 Items
"fields"
:
[1 Items
0
:
{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 Items
0
:
{2 Items
"name"
:
string
"dob"
"meta"
:
{3 Items
"displayName"
:
string
"Your DOB"
"displayType"
:
string
"date"
"validation"
:
{1 Items
"max"
:
string
"2010/12/12"
}
}
}
]
}

Star us at github

© Copyright 2023 MuiForms