Used to facilitate date selection within forms or interfaces.
The DateInput
and DatePicker
components are based on react-datepicker
, offering a variety of customization options including single date selection, month/year picking, range selection, and controlled inputs.
These components enhance user experience by providing intuitive and flexible date selection functionality.
Usage
Full Date Picker
Render a comprehensive date picker that allows users to select single dates.
import { DateInput } from '@passfort/castle'content_copyCopy
content_copyCopy
live example
Month Picker
Provide a date picker focused on selecting months.
import { Month } from '@passfort/castle'content_copyCopy
content_copyCopy
live example
Year Picker
Allow users to select a specific year using the date picker.
import { Year } from '@passfort/castle'content_copyCopy
content_copyCopy
live example
Date Range Picker
Enable selection of a range of dates, useful for booking systems or reports.
import { DateRange } from '@passfort/castle'content_copyCopy
content_copyCopy
live example
Controlled Date Range Picker
Manage the selected date range through component state for more controlled interactions.
content_copyCopy
live example