ID

Form pickers

Pick dates, ranges, times, options and colours — with Selaras’ own pickers (no library) or with Flatpickr and Tom Select.

Flatpickr 4.6 · MIT Tom Select 2.6 · Apache-2.0

Selaras pickers No library

Built into the template. The date picker follows the WAI-ARIA date picker pattern: arrow keys move by day and week, Page Up/Down by month (Shift for a year), Enter picks, Escape closes. You can also type a date.

Date & date range

Today or later. Type it, or press the calendar button.

Colour swatches plain radio buttons — CSS only

Label colour
HTML — include once, after selaras.js; every [data-sl-datepicker] is set up
<script src="assets/js/sl-datepicker.js"></script>

Flatpickr

For date-time and time-only fields. Selaras restyles the calendar with its tokens, so it follows the theme and dark mode.

JavaScript
const base = { allowInput: true, locale: { firstDayOfWeek: 1 }, dateFormat: 'M j, Y' };
flatpickr('#fpDate', base);
flatpickr('#fpRange', { ...base, mode: 'range', defaultDate: ['Sep 1, 2026', 'Sep 30, 2026'] });
flatpickr('#fpDateTime', { ...base, enableTime: true, dateFormat: 'M j, Y h:i K', defaultDate: 'Sep 23, 2026 02:00 PM' });
flatpickr('#fpTime', { ...base, enableTime: true, noCalendar: true, dateFormat: 'h:i K', defaultDate: '11:00' });

Tom Select

Searchable selects and tag inputs for long lists. It keeps your native <select> in sync, so forms submit as usual.

JavaScript
new TomSelect('#tsClient', { create: false, maxOptions: null });
new TomSelect('#tsPeople', { plugins: ['remove_button'], maxOptions: null });
new TomSelect('#tsLabels', { plugins: ['remove_button'], create: true, createOnBlur: true, persist: false });