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.
<div class="sl-field">
<label for="pkDue">Due date</label>
<div class="sl-dp" data-sl-datepicker data-today="2026-09-23" data-min="2026-09-23">
<input class="sl-control" id="pkDue" type="text" value="Oct 6, 2026" autocomplete="off" aria-describedby="pkDueHelp">
<button class="sl-dp-toggle" type="button" aria-label="Choose due date"><i class="ti ti-calendar" aria-hidden="true"></i></button>
</div>
<p class="sl-help" id="pkDueHelp">Today or later. Type it, or press the calendar button.</p>
</div>
<div class="sl-field">
<label for="pkSprint">Sprint dates</label>
<div class="sl-dp" data-sl-datepicker data-mode="range" data-today="2026-09-23">
<input class="sl-control" id="pkSprint" type="text" value="Sep 21 – Oct 2, 2026" autocomplete="off">
<button class="sl-dp-toggle" type="button" aria-label="Choose sprint dates"><i class="ti ti-calendar-event" aria-hidden="true"></i></button>
</div>
</div> Colour swatches plain radio buttons — CSS only
<fieldset class="sl-swatches">
<legend>Label colour</legend>
<label><input type="radio" name="pkColor" value="primary" checked><span style="--sw: var(--sl-primary)"></span><b>Primary</b></label>
<label><input type="radio" name="pkColor" value="secondary"><span style="--sw: var(--sl-secondary)"></span><b>Secondary</b></label>
<label><input type="radio" name="pkColor" value="data-3"><span style="--sw: var(--sl-data-3)"></span><b>Sky</b></label>
<label><input type="radio" name="pkColor" value="data-4"><span style="--sw: var(--sl-data-4)"></span><b>Amber</b></label>
<label><input type="radio" name="pkColor" value="rose"><span style="--sw: var(--sl-rose-ink)"></span><b>Rose</b></label>
<label><input type="radio" name="pkColor" value="success"><span style="--sw: var(--sl-success-500)"></span><b>Green</b></label>
<label><input type="radio" name="pkColor" value="danger"><span style="--sw: var(--sl-danger-500)"></span><b>Red</b></label>
</fieldset> <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.
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.
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 });