

Every state


default


focus


open


due-soon


overdue


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "due" | Id of the date button; label, hint and panel hang off it. |
| name | string | "due" | Form name of the due date (yyyy-mm-dd). |
| label | string | "Due date" | The field's visible label. |
| description | string | – | Help line under the hint. |
| today | Date | – | Today's date; defaults to the real today. The hint counts from it. |
| defaultValue | string | – | The due date at the start (yyyy-mm-dd). |
| workingDays | boolean | false | Counts Monday to Friday only ("3 working days left"). |
| soonDays | number | 3 | This many days or fewer left marks the date as due soon. |
| placeholder | string | "Pick a date" | Button text before a date is chosen. |
| emptyHint | string | "Pick a date to see how long is left." | The hint before a date is chosen. |
| locale | string | "en-GB" | Locale for the date. |
| onValueChange | (value: string) => void | – | Called with the chosen date (yyyy-mm-dd). |
| required | boolean | – | Marks the field as required. |
| disabled | boolean | – | Disables the field. |
| error | string | – | Error message; marks the field invalid. |
| className | string | – | Extra classes on the field. |


