Multiple dates picker
Each click adds a day or takes it away. The value is a sorted list of ISO dates.
The code
import { createDatePicker } from '@nervure/datetime';
createDatePicker('#field', {
mode: 'multiple',
value: ['2026-12-04', '2026-12-11'],
onChange: (selection) => console.log(selection.value, selection.start, selection.end),
});The value is ['2026-12-04', '2026-12-11', '2026-12-18']. Read the guide for every option, and see every example.
What it does
- The panel stays open: close it with Apply or Escape.
min,maxanddisableclose days here too.
Why this one
- No dependency, about 18 kB gzipped for every mode, zone and language.
- Values are ISO 8601 text. Each selection also gives two instants,
startandend, in the time zone. - 28 languages and right to left. Keyboard and screen readers.
- Your CSS and your colours, through CSS variables. Light and dark.
- The same picker in plain JavaScript, as a web component, in React and in Vue.