DateTimeFormatterThis is a React component
SourceThis is a React component
import { DateTimeFormatter } from "@prestojs/ui";
DateTimeFormatter(props)
Formats a date with time based on user browser's locale.
If no value is provided blankLabel
is returned.
If an invalid date is provided invalidDateLabel
is returned.
This is the default formatter used for DateTimeField
Parameter | Type | Description | |
---|---|---|---|
props.blankLabel | ReactNode | What to render when Defaults to | |
props.invalidDateLabel | ReactNode | What to render when passed date is invalid Defaults to | |
props.localeOptions | The localeOptions passed to Date.toLocaleString. | ||
props.locales | string|Array | The locales option passed to Date.toLocaleString. | |
* | props.value | Date|string|null | The value to format |