DatePicker
Custom calendar popover matching CRM DateSelect.
When to use
Use DatePicker when you need custom calendar popover matching crm dateselect.
Import
TypeScript
import { DatePicker } from '@gzodo/ui'DatePicker is a control-surface trigger with a positioned calendar. The value is { startDate, endDate } as ISO strings. The date field is split into segments from format (DD, MM, YYYY, YY). Use range for two calendars and showTime for hour steps. Month, year, and time pickers reuse Select.
Examples
6Basic
Controlled
value.startDate. Choosing a day updates the ISO string and keeps the time part.Format
Segments follow
format. YYYY-MM-DD starts on the year. Type a digit, arrows change the focused segment, and a finished segment moves to the next one.Range
Two calendars side by side. Days between start and end use the range tone.
With time
showTime adds a time Select. timeStep defaults to 15 minutes.Outline and size
Variant and size match the other controls.
Disabled
A disabled trigger does not open the calendar.
DatePicker
13DatePicker
Property
Description
Type
Default
value{ startDate, endDate } ISO strings. Use empty string for unset.
DatePickerValue—
onChangeNext start/end ISO values.
(value: DatePickerValue) => void—
rangeShow start and end calendars.
booleanfalseshowTimeShow a time Select next to the date input.
booleanfalsetimeStepMinutes between time options.
number | string15formatSegment pattern. Tokens DD, MM, YYYY, and YY render as editable sections; other characters stay as separators.
string'DD.MM.YYYY'isOpenControlled open state.
boolean—
onOpenChangeCalled when the popover opens or closes.
(open: boolean) => void—
isPortalPortal the calendar to document.body so it paints above clipped parents.
booleantruevariantControl surface variant.
ControlVariant'default'sizeControl height.
'sm' | 'md' | 'lg' | 'xl''md'disabledBlocks opening the calendar.
boolean—
fullWidthStretch the trigger.
boolean—