v0.154.0
Minor Changes
-
#1279
296e8ae8Thanks @tenphi! - Add period pickers —WeekPicker,MonthPicker,QuarterPicker, andYearPicker— mirroring Ant Design'sDatePicker picker="week|month|quarter|year"feature. Each selects a whole calendar period rather than a specific day and is exposed as its own component, all sharing one internalPeriodPickerbase.The value is always a single
CalendarDate(from@internationalized/date) snapped to the start of the period: week → first day of the week (locale-aware), month → the 1st, quarter → the 1st of the quarter's first month, year → January 1st. The field renders a compact label (2026-W33,2026-08,2026-Q3,2026), overridable via theformatValueprop.import { MonthPicker, QuarterPicker, WeekPicker, YearPicker } from '@cube-dev/ui-kit'; <MonthPicker onChange={onChange} /> <QuarterPicker onChange={onChange} minValue={min} maxValue={max} />
Built on the existing DatePicker chrome (
DateInputBase+DialogTrigger/Dialog), so they inherit field labeling, validation, sizes, and the mobile tray. React Aria has no month/quarter/year/week panels, so those are custom, while the week panel reuses the React Aria day grid with an added week-number column and full-week highlight (behind a new, additivepickerModeon the internalCalendar/CalendarGrid, leaving existingDatePicker/RangeCalendarbehavior unchanged).