Skip to main content

Date

To create an input field of the type, date - define the value as a date. The list of attributes passed to the input field type is given below.  

Attribute NameDatatype Description
type*String 
(Value should be date)
The type of the input field. Value of the field should be date.
placeholder*String (150)Sample field value displayed to the user that describes the expected value of the input field.
name*String (50)A unique identifier for the field. Upon form submission, value defined for this key will be available in the function associated with the form.
label*String (150)Describes the display name for this field.
hintString (100)Provides a brief description of the fields purpose and the expected input.
valueStringProvide a default input value for the field.  
mandatoryBooleanDefines if the field's requisite is mandatory or not. 
Note: Default value is considered to be false.
disabledBooleanIf disabled is true, then the field will not be editable

Sample Code:

Copied{
   "type":"date",
   "name":"date",
   "label":"Date",
   "placeholder":"2020-01-01",
   "hint":"Enter the preferred date",
   "mandatory":false,
   "value":"2020-04-30",
   "disabled" : false
}

JSON format passed in handlers for the filled-in value:

Copied{
   "meta":{
      "type":"date",
      "value":"2020-04-30"
   },
   "value":"2020-04-30"
}