Date Picker Changelog
Notable changes to @pglejzer/datepicker-ui, newest first. It is the companion of timepicker-ui, and the date picker docs describe the current API. The package follows Semantic Versioning.
Version 1.1.0 - 2026-11-11
Added
ui.layoutgives any surface the docked, modal or full-screen look, so a dialog can use the docked month and year menusui.inline.headline: falsehides an inline calendar's own headlinecalendar.defaultValuesets the starting value of an empty input, in the same shape assetValue()setValue(),isSelectable(),goTo()and range presets accept"today"for any dateui.inline.navigation: "caption"shows the month and year as text next to the arrows, without the month and year menusui.inline.announceSelection: falseleaves selection announcements to the host and keeps month announcementssetView(),getView()and theswitch:viewevent switch between the calendar and the text fields, also for an inline single picker with the modal layoutgetVisibleRange()returns the first and last day shown, andnavigatecarries them asfromandtogoTo(date)shows the month of a date without selecting itisSelectable(value)checks a day, a range or a set of days against every selection ruleclear()empties the value and firesinput,changeand the newclearevent, which the Clear button also fires.setValue(null)clears without any of themlabels.inRangenames the days inside a range for screen readers, and a start picked without an end is named as the start- The
cancelevent reportsreason: "toggle"when the toggle button closes the picker - The kit exports
applyTheme,createTextButton,Pager,RANGE_SEPARATOR,splitRangeText,leadingDateLength,normalizeDigitsand the calendar's week and name helpers - Kit hosts accept
labelledByto take their accessible name from a visible title - Kit hosts have
setLabel(label, labelledBy?), which renames a shown surface by the same rule as the constructor - The kit exports
fitsViewport(root, anchor), which tells whether a docked surface fits the window entirely below or entirely above its anchor formatFullDate()in./kittakes{ year: false }to leave the year outisDateTextComplete()in./kittells whether a typed date has every group in fulldp-ui__presets--columngives a presets group outside the picker the same column look
Changed
navigatenow also fires when opening,setValue(),setOptions(),goTo()or a resize changes the shown days. Checksourceto tell them apart- The input view's text fields always format typed digits to
ui.format, adding its separators.ui.maskstill controls only the page inputs - A date typed in the text fields emits
select:day,range:startorrange:endlike a picked day, andbehavior.commitOnChangecommits it
Fixed
- The picker no longer sets
color-schemeon the element around the input, so page inputs,ui.endInputincluded, keep the page's color scheme - Months that cannot be picked in the docked month menu now look disabled, as in the month and year grids
- Resizing the window or rotating a phone with the picker open now updates how many months show side by side and whether
calendar.range.presetsare a column or a chip row - On touch screens a tapped day, menu item, preset or button no longer keeps a hover highlight. Hover styles now apply only where the device supports hover
- Clicking
ui.toggleButtonwhile a docked picker is open now closes it instead of reopening it with an empty draft - A picker no longer overflows the window or a parent with a set width. Day cells shrink from 48 px to 36 px. Narrower inline calendars scroll sideways
- A calendar placed inside another picker's dialog or popover no longer takes that surface's pager height, grid height and button size
- Typing a separator after an unfinished year no longer pads it with zeros, so
21.10.26.no longer becomes21.10.0026 - Changing options on a shown calendar, or resizing it to another number of months, no longer replays the month fade-in
- With
ui.displayMode: "auto", a docked picker that fits neither below nor above the field, at its current position on the page, opens as a dialog setOptions()with a newlabels.titlenow also renames the open popover, dialog or inline group, which kept the old accessible name- An inline calendar is laid out as soon as it is mounted instead of one frame later, and a calendar mounted in a hidden container lays itself out before it is first shown
- Enter saves the value only where an OK button is shown. Elsewhere it picks the day or the typed date like a click
- A docked popover wider than the room right of its field now shifts left into the window, so several months no longer overlap or squeeze
- Clicking the input of a picker that opens on the month or year grid now moves focus into the grid, so Escape closes the popover again
- A docked picker with
calendar.renderDatecontent no longer grows after opening, soui.displayMode: "auto"opens a dialog when it does not fit - A docked popover wider than the window now keeps its edge margin on both sides instead of sticking out on one side
Version 1.0.0 - 2026-10-19
Added
- Three surfaces: a docked popover, a modal dialog and an inline calendar (
ui.inline).ui.displayMode: "auto"picks docked or modal from the viewport size - A range picker in a modal opens full screen on small windows.
ui.fullscreensets the width limit, orfalseturns it off - Selection modes through
calendar.mode:single,rangeandmultiple.calendar.multiple.maxcaps the number of days - Range length limits with
calendar.range.minLengthandcalendar.range.maxLength, and ready-made ranges withcalendar.range.presets - Month and year pickers with
calendar.precision, where the value isYYYY-MMorYYYY - Several months side by side with
calendar.months.calendar.pageBysets whether the arrows move one month or a whole view - Typed input with a switch between the calendar and the text field, controlled by
ui.viewSwitchandui.initialView.ui.maskformats typed digits toui.format ui.endInputturns a range into two page inputs, Start and End- Disabled days through
calendar.minDate,calendar.maxDate,calendar.disabledDates,calendar.enabledDates,calendar.disabledWeekdaysandcalendar.isDateDisabled calendar.decorateDateadds a class, a badge or an accessible label to a day, andcalendar.renderDateputs content such as a price inside the day cellcalendar.validatemarks the field invalid with your own message and never blocks a pick or a commit- The
errorevent carries acode, and for unavailable dates areasonsuch asmin,max,disabledorweekday ui.startViewopens the picker on the day, month or year panel. Grid options:ui.fixedWeeks,ui.outsideDays,ui.weekNumbers,ui.todayButton,ui.clearButtonandui.footer- Themes
basic,m3-green,crane,crane-straight,m2,glassmorphic,pastel,ai,cyberpunkandblueprint, set withui.theme ui.colorSchemeacceptslight,darkandauto.autochecks the background behind the input, then the pagecolor-scheme, then the OScalendar.localedrivesIntlmonth and weekday names, the headline and the input format, andcalendar.weekStartsets the first day. Numbers show in the locale's digits, and right-to-left layouts are supported- The day grid follows the WAI-ARIA date picker pattern with full keyboard support, and a live region announces month and selection changes
- With
prefers-reduced-motion: reduce, slides and resizes give way to short fades - An input with a
namesubmits ISO values through a hidden input. The visible input getsinputandchangeevents on commit, and a form reset restores the initial value - Methods
create,open,close,destroy,getValue,setValue,setOptionsandsetActiveEnd, pluson,onceandoff, whereonandoncereturn an unsubscribe function - Static methods
DatepickerUI.getById,DatepickerUI.getAllInstancesandDatepickerUI.destroyAll - Events
open,close,cancel,confirm,update,error,select:day,select:month,select:year,navigate,range:startandrange:end, each with a matchingcallbacks.on*option - A second entry,
@pglejzer/datepicker-ui/kit, exports the surface hosts, surface-mode rules, color-scheme detection and date text helpers for companion packages - No runtime dependencies, and the package imports safely during server rendering
- ESM, CommonJS, TypeScript declarations and a UMD build for CDNs
Changed
- Check before upgrading: 1.0.0 is a full rewrite, so nothing from 0.0.1 carries over. The README describes the current API.
- Options are grouped into
calendar,ui,labels,behaviorandcallbacks, andsetOptions()updates them at runtime - The picker markup uses
dp-ui__*class names, and custom CSS needs to target them - Styling tokens are
--dp-ui-*custom properties - The CSS ships as
index.css(core and every theme),main.css(core only) and one file per theme, such astheme-m3-green.css