useDate
A custom hook for managing date inputs.
We also have access to the ISO format: 0000-00-00
Cerberus exposes the following helper functions for date formatting. These are already used internally by the useDate
hook.
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. |
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. |