datetimeThe datetime widget displays a locale specific datetime.
The formData value that can be handled by this widget must be a string that matches pattern YYYY-MM-DDTHH:mm.
{
"schema": {
"properties": {
"myDatetimeProperty": {
"type": "string"
}
}
},
"form": [
"myDatetimeProperty"
],
"uiSchema": {
"myDatetimeProperty": {
"widget": "datetime"
}
},
"formData": {
"myDatetimeProperty": "2018-06-14T16:02"
}
}
This will render a text input field that formats an entered datetime. In addition, a datetime picker will be attached to the field. The exact render format depends on the locale of the client.