Date-field

Styled native date input: <input type="date" class="form-control date-field">. The native calendar picker IS the behavior layer (keyboard entry, locale formats, AT support) — the class only normalizes the WebKit picker-indicator (opacity, hover wash) and the intrinsic edit-field padding so the control lines up with text inputs. No custom calendar.

Root: input.date-field on <input>

Example

Example
<input class="form-control date-field" type="date" id="due" value="2026-08-14">

Contract

Variants & modifiers

ClassAxisRules
form-controlbase-skinone required · exclusive
is-invalidmodifieroptional
form-control-compactmodifieroptional

Accessibility

OnAttributeLevelWhen
input.date-fieldaria-labelrecommendedWhenever there is no visible <label> associated via for/id (e.g. the fields inside a .date-range).

Associate a label via for/id, or aria-label when the field sits in a composite like .date-range. Native date inputs announce and constrain values themselves; use min/max/required attributes rather than scripted validation where possible. Pair .is-invalid with aria-invalid="true" and aria-describedby.

Nesting

Allowed in:

  • .form-group
  • .date-range
  • toolbars

Subcomponents

Date-range

Row layout for a start/end pair: two .date-field inputs flexing equally around an en-dash separator. Constrain the pair with min/max attributes (set min on the end field to the start value in your app) — the layout itself imposes no logic.

Root: .date-range on <div>

Example

Example
<div class="date-range" role="group" aria-label="Sprint window"><input class="form-control date-field" type="date" value="2026-08-03" aria-label="Start date"><span class="date-range-separator" aria-hidden="true">–</span><input class="form-control date-field" type="date" value="2026-08-17" aria-label="End date"></div>

Structure

SelectorRequiredDescription
.date-fieldrequiredTwo <input class="form-control date-field" type="date"> DIRECT children (start, then end), each with its own accessible name (aria-label="Start date" / "End date").
.date-range-separatoroptionalThe "–" between the fields; decorative, so it must carry aria-hidden="true".

Accessibility

OnAttributeLevelWhen
.date-range-separatoraria-hiddenrequired
.date-rangerolerecommendedRecommended: role="group" with aria-labelledby pointing at the visible caption, so AT announces the pair as one field ("Sprint window").

Give the row role="group" + aria-labelledby (or aria-label) naming the range, and each input its own aria-label (Start date / End date). The separator is visual only — keep aria-hidden="true" on it.

Nesting

Allowed in:

  • .form-group
  • filter rows
  • toolbars

Never inside (or containing):

  • .date-range