Skip to content

Date Picker

.bp-datepicker styles the native <input type="date"> element. The calendar popup is the browser’s own — no custom calendar, no JS, no accessibility work needed. accent-color themes the popup to match the DS primary color. color-scheme: light dark ensures the popup follows the page theme.

Default

<label class="demo-field">
<span class="demo-field__label">Appointment date</span>
<input type="date" class="bp-datepicker" />
</label>

With min / max

<label class="demo-field">
<span class="demo-field__label">Select a date in 2025</span>
<input type="date" class="bp-datepicker"
min="2025-01-01" max="2025-12-31" />
</label>

Date range (start + end)

<div class="demo-date-range">
<label class="demo-field">
<span class="demo-field__label">From</span>
<input type="date" class="bp-datepicker" id="range-start" />
</label>
<label class="demo-field">
<span class="demo-field__label">To</span>
<input type="date" class="bp-datepicker" id="range-end" />
</label>
</div>

Disabled

<label class="demo-field">
<span class="demo-field__label">Locked date</span>
<input type="date" class="bp-datepicker" value="2025-06-15" disabled />
</label>
VariableDefaultDescription
--datepicker-border1px solid --bp-color-borderInput border
--datepicker-radius--bp-radius-mdBorder radius
--datepicker-bg--bp-color-bgBackground
--datepicker-color--bp-color-textText color
--datepicker-accent--bp-primaryCalendar popup accent color
--datepicker-padding--bp-space-2 --bp-space-3Inner padding
--datepicker-height2.5remInput height

Custom accent

<label class="demo-field">
<span class="demo-field__label">Custom color</span>
<input type="date" class="bp-datepicker demo-datepicker--teal" />
</label>
No axe violations tested 2026-05-11
  • <input type="date"> provides full keyboard navigation, screen reader announcement, and mobile-native date pickers for free.
  • Always pair with a <label> — either wrapping the input or linked via for/id.
  • Use min and max attributes to constrain the valid range — the browser communicates this to assistive technology automatically.
  • required + :invalid triggers the error border via CSS without JavaScript.
APIAvailabilityUsed forWithout it
<input type="date"> Widely available Baseline 2020 Native calendar popupFalls back to type="text"
accent-color Widely available Baseline 2022 Themes the calendar popupSystem default accent
color-scheme Widely available Baseline 2021 Dark mode calendar popupPopup stays in light mode

For requirements beyond what the native input supports (range selection, disabled dates by rule, multi-month view), these libraries share BPL DS principles — no framework coupling, CSS-customizable, progressive enhancement:

LibrarySizeWhy it fits
Cally~9 KBWeb Components (<calendar-date>, <calendar-range>). Zero dependencies, no framework. Pairs with any <input>. Follows the same custom-element pattern as BPL DS.
Pikaday~5 KBVanilla JS, no dependencies. Enhances an <input type="text"> progressively. Ships minimal CSS you can replace entirely with your own.
Flatpickr~16 KBVanilla JS, no dependencies. Rich feature set (range, time, inline). Themeable via CSS custom properties. Widely used.

Recommended: Cally — it uses the same Web Component pattern as <bp-dropdown> and <bp-table>, so it fits naturally into BPL DS’s progressive enhancement model. Drop <calendar-date> next to .bp-datepicker and wire them together with a few lines of JS.