We also have access to the ISO format: 0000-00-00
Usage
Helpers
Cerberus exposes the following helper functions for date formatting. These are already used internally by the useDate
hook.
Date Formats
Military Formatters
API
Arguments
The useDate
hook accepts the following optional arguments:
Name | Default | Description |
---|---|---|
format | 'DD MMM YYYY' | The format of the date string. |
initialValue | An initial value of the date string. | |
onChange | The custom event handler for the date input. |
Return
Name | Default | Description |
---|---|---|
format | 'DD MMM YYYY' | The format of the date string is. |
value | The current value of the date string. | |
ISO | The current value of the date string in ISO format. |