Actions and inputs
Date, time and calendar
Native <input type="date"> and <input type="time"> with .kui-input: the browser’s own pickers, in the language of the device. <kui-calendar> shows one month as a grid to choose a day from, and can follow a date field.
Examples
Date and time fields
min and max limit what can be chosen; the browser refuses other values when the form is sent. A step of 900 seconds gives a quarter-hour time.
Working days until the end of February.
From 8:00 to 16:00.
<div class="kui-form kui-form--wide">
<div class="kui-form__row">
<div class="kui-field">
<label class="kui-label" for="date-day">Day of the appointment</label>
<input class="kui-input" id="date-day" name="day" type="date" min="2026-11-30" max="2027-02-26" value="2026-12-03" aria-describedby="date-day-hint">
<p class="kui-hint" id="date-day-hint">Working days until the end of February.</p>
</div>
<div class="kui-field">
<label class="kui-label" for="date-time">Time</label>
<input class="kui-input" id="date-time" name="time" type="time" min="08:00" max="16:00" step="900" value="10:30" aria-describedby="date-time-hint">
<p class="kui-hint" id="date-time-hint">From 8:00 to 16:00.</p>
</div>
</div>
</div>
A date field with a month calendar
The calendar opens in a popover next to the field. for names the date field: choosing a day fills the field, and a date typed into the field moves the calendar. The field’s min and max apply to the calendar; days outside them are struck through. marked puts a dot under days that hold something, here the days with free appointments.
From 2 December to 29 January. A dot marks a day with free appointments.
<div class="kui-field">
<label class="kui-label" for="date-due">Due date of the payment</label>
<div class="kui-cluster kui-cluster--nowrap">
<input class="kui-input" id="date-due" name="due" type="date" min="2026-12-02" max="2027-01-29" value="2026-12-10" aria-describedby="date-due-hint">
<kui-popover placement="bottom-end">
<button class="kui-button kui-button--icon" type="button" aria-label="Choose the due date from a calendar"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#calendar-days"></use></svg></button>
<div class="kui-popover" role="dialog" aria-label="Due date of the payment" hidden>
<kui-calendar for="date-due" marked="2026-12-04 2026-12-11 2026-12-18 2026-12-23 2026-12-31"></kui-calendar>
</div>
</kui-popover>
</div>
<p class="kui-hint" id="date-due-hint">From 2 December to 29 January. A dot marks a day with free appointments.</p>
</div>
In other languages
The names of months and days come from the browser in the language of the nearest lang attribute, and so does the first day of the week where the browser knows it. The kit writes none of them.
<div class="kui-field" lang="sr-Latn">
<label class="kui-label" for="date-sr">Datum sastanka</label>
<div class="kui-cluster kui-cluster--nowrap">
<input class="kui-input" id="date-sr" type="date" min="2026-12-01" max="2026-12-31" value="2026-12-24">
<kui-popover placement="bottom-end">
<button class="kui-button kui-button--icon" type="button" aria-label="Izaberite datum u kalendaru"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#calendar-days"></use></svg></button>
<div class="kui-popover" role="dialog" aria-label="Datum sastanka" hidden>
<kui-calendar for="date-sr" marked="2026-12-04 2026-12-18"></kui-calendar>
</div>
</kui-popover>
</div>
</div>
<div class="kui-field" lang="zh">
<label class="kui-label" for="date-zh">会议日期</label>
<div class="kui-cluster kui-cluster--nowrap">
<input class="kui-input" id="date-zh" type="date" value="2027-01-15">
<kui-popover placement="bottom-end">
<button class="kui-button kui-button--icon" type="button" aria-label="在日历中选择日期"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#calendar-days"></use></svg></button>
<div class="kui-popover" role="dialog" aria-label="会议日期" hidden>
<kui-calendar for="date-zh"></kui-calendar>
</div>
</kui-popover>
</div>
</div>
States
Every state
Today has a ring and bold digits. The chosen day is filled with the text colour. Days of the next and previous month are faint. A day outside min and max is struck through and cannot be chosen, but the arrows still pass over it. The month buttons are disabled where no allowed day remains. A date field has the same states as a text field.
Choose a date after today.
<div class="kui-form kui-form--wide">
<div class="kui-form__row">
<div class="kui-field"><label class="kui-label" for="date-s1">Empty</label><input class="kui-input" id="date-s1" type="date"></div>
<div class="kui-field"><label class="kui-label" for="date-s2">Disabled</label><input class="kui-input" id="date-s2" type="date" value="2026-11-27" disabled></div>
<div class="kui-field"><label class="kui-label" for="date-s3">Invalid</label><input class="kui-input" id="date-s3" type="date" value="2026-11-01" aria-invalid="true" aria-describedby="date-s3-e"><p class="kui-error-text" id="date-s3-e"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#circle-alert"></use></svg><span>Choose a date after today.</span></p></div>
<div class="kui-field"><label class="kui-label" for="date-s4">Date and time</label><input class="kui-input" id="date-s4" type="datetime-local" value="2026-12-03T10:30"></div>
</div>
</div>
Classes and attributes
input type="date", "time", "datetime-local", "month"- With .kui-input: the native fields and pickers, with figures of equal width.
min, max, step- The limits; on a time field, step in seconds.
kui-calendar- One month to choose a day from. It sets the kui-calendar class itself.
value- The chosen day, YYYY-MM-DD. The calendar opens on that month.
min, max- The first and last day that can be chosen. Taken from the bound field when not set.
marked- Days, separated by spaces, that get a dot.
for- The id of a date field that the calendar fills and follows.
event kui-change- Fired with detail.value when a day is chosen.
Keyboard
- Left or Right
- The previous or next day.
- Up or Down
- The same day of the previous or next week.
- Home or End
- The first or last day of the week.
- Page Up or Page Down
- The previous or next month.
- Shift + Page Up or Page Down
- The previous or next year.
- Enter or Space
- Chooses the focused day.
Accessibility
- The calendar is a grid of buttons with one tab stop, as in the WAI-ARIA date picker dialog example. Each day is named in full in the page’s language: “Thursday, December 10, 2026”.
- Today is marked with aria-current="date"; the chosen day with aria-pressed="true".
- The month heading is a polite live region, so moving to another month is announced.
- Give the calendar a group with a name, and keep the date field: some people type a date faster than they find it.
Do and do not
Do
- Use the native date field for dates a person knows, such as a birthday.
- Use the calendar where seeing the week or the free days helps the choice.
- Say the limits in the hint.
Do not
- Do not build a date from three selects.
- Do not mark days with colour alone; say in the text what a dot means.
- Do not set the first day of the week by hand; the locale knows it.