Basic
A date picker combines a DateField with a Calendar popover, allowing users to either type in or select a date and time.
Preview
Code
Event date
Installation
CLI
Manual
npx hq-kit add date-picker
Date and Time
While not a full-fledged date-time picker, this setup lets you edit both date and time in a segmented field.
Preview
Code
Event date
Validation
To ensure that the date picker is filled out, use the isRequired
prop.
Preview
Code
Custom Validation
The validate
function is your go-to for custom validation rules. It checks the current date value and returns an error message string or strings if the value doesn't meet your criteria.
Preview
Code
Controlled
Take control of your date picker by passing a value
prop, which allows you to manage the selected date.
Preview
Code
Thursday, February 6, 2025
2025-02-06
Event date
Disabled
When the date picker is disabled, it becomes non-interactive and visually represents a disabled state.
Preview
Code
Event date