DateFormatterThis is a React component
SourceThis is a React component
import { DateFormatter } from "@prestojs/ui";
DateFormatter(props)
Formats a date without 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 DateField
| 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.toLocaleDateString. | ||
| props.locales | string|Array | The locales option passed to Date.toLocaleDateString. | |
| * | props.value | Date|string|null | The value to format |