Datetime
The Datetime datetime
component handles timestamps value, it accepts date + time values in ISO format
(i.e., "2023-05-12T22:14:49.116Z") or JavaScript Date() object.
The value returned by this component is always in ISO format (opens in a new tab).
Example
{
"component": "datetime",
"label": "Datetime field",
"name": "my_datetime",
"react-antd": {
"showTime": true
},
"react-rsuite5": {
"format": "dd/MM/yyyy - hh:mm"
}
}
Loading...
Installation
Some frameworks requires additional imports to enable date pickers and localization
// ... usual imports for LetsForm
import CustomProvider from 'rsuite/CustomProvider';
import locale from 'rsuite/locales/it_IT';
const MyForm = () => {
return (
<CustomProvider locale={locale}>
<LetsForm
// params
/>
</CustomProvider>
);
};
Reference
Property | Type | Description |
---|---|---|
component | string | = "datetime" |
name | string | The name of the field and the key of the JSON |
label | string | i18n | Label of the field |
hint | string | i18n | Help text for the field (generally shown below the input box) |
placeholder | string | i18n | Placeholder text, visibile when the field is empty |
disabled | boolean | Disables and greys out the field |
readOnly | boolean | Put the field in read only mode |
hidden | boolean | Hides the field from the form |
Pick up a framework to show specific properties |