Date Selector
Accessible one- or two-month calendar for choosing a date range.
c2-date-selector chooses a start and end date without a time-zone conversion. The first activation starts a range,
the second completes it, and the third starts over. Use min and max for availability, months="1" for compact
layouts, and locale or week-start to match the audience. Arrow keys move between days; Page Up and Page Down move
between months. The calendar keeps a usable seven-column minimum width; on mobile, a two-month selector stacks the
months vertically.
Installation
npm install @c2n/date-selectorUsage
September 2026
October 2026
October 2026
November 2026
Listen for change to receive { from, to } in event.detail; both are YYYY-MM-DD strings. input fires at the
same time for generic form bindings. With name="trip", a complete range submits trip and trip-end; override the
second key with end-name. required treats an unfinished range as missing.