Date field with a calendar
A date field with a calendar button joined on and the month open below it: today ringed, the chosen day filled, weekends struck out.
Weekdays only. For example, 28/10/2026
October 2026
| Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
|---|---|---|---|---|---|---|
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-input-moj-date-picker">
<div class="dp">
<label for="ukc-input-moj-date-picker-in">Site visit date</label>
<p class="hint" id="ukc-input-moj-date-picker-hint">Weekdays only. For example, 28/10/2026</p>
<div class="wrap">
<input id="ukc-input-moj-date-picker-in" type="text" inputmode="numeric" value="28/10/2026" aria-describedby="ukc-input-moj-date-picker-hint">
<button class="tog" type="button" aria-haspopup="dialog" aria-expanded="true" aria-controls="ukc-input-moj-date-picker-dlg"><span class="sr">Choose date</span><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="5" width="18" height="16" rx="1"/><path d="M3 10h18M8 3v4M16 3v4"/></svg></button>
</div>
<div class="dlg" id="ukc-input-moj-date-picker-dlg" role="dialog" aria-modal="false" aria-labelledby="ukc-input-moj-date-picker-title">
<div class="head">
<div class="nav"><button type="button" aria-label="Previous year"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 6l-6 6 6 6M18 6l-6 6 6 6"/></svg></button><button type="button" aria-label="Previous month"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6"/></svg></button></div>
<h2 id="ukc-input-moj-date-picker-title" aria-live="polite">October 2026</h2>
<div class="nav"><button type="button" aria-label="Next month"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg></button><button type="button" aria-label="Next year"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l6 6-6 6M12 6l6 6-6 6"/></svg></button></div>
</div>
<table class="cal" aria-labelledby="ukc-input-moj-date-picker-title">
<thead><tr><th scope="col"><span aria-hidden="true">Mon</span><span class="sr">Monday</span></th><th scope="col"><span aria-hidden="true">Tue</span><span class="sr">Tuesday</span></th><th scope="col"><span aria-hidden="true">Wed</span><span class="sr">Wednesday</span></th><th scope="col"><span aria-hidden="true">Thu</span><span class="sr">Thursday</span></th><th scope="col"><span aria-hidden="true">Fri</span><span class="sr">Friday</span></th><th scope="col"><span aria-hidden="true">Sat</span><span class="sr">Saturday</span></th><th scope="col"><span aria-hidden="true">Sun</span><span class="sr">Sunday</span></th></tr></thead>
<tbody><tr><td></td><td></td><td></td><td><button class="day" type="button" aria-label="Thursday 1 October 2026">1</button></td><td><button class="day" type="button" aria-label="Friday 2 October 2026">2</button></td><td><button class="day" type="button" aria-label="Saturday 3 October 2026" aria-disabled="true">3</button></td><td><button class="day" type="button" aria-label="Sunday 4 October 2026" aria-disabled="true">4</button></td></tr><tr><td><button class="day" type="button" aria-label="Monday 5 October 2026">5</button></td><td><button class="day" type="button" aria-label="Tuesday 6 October 2026">6</button></td><td><button class="day" type="button" aria-label="Wednesday 7 October 2026">7</button></td><td><button class="day" type="button" aria-label="Thursday 8 October 2026">8</button></td><td><button class="day" type="button" aria-label="Friday 9 October 2026">9</button></td><td><button class="day" type="button" aria-label="Saturday 10 October 2026" aria-disabled="true">10</button></td><td><button class="day" type="button" aria-label="Sunday 11 October 2026" aria-disabled="true">11</button></td></tr><tr><td><button class="day" type="button" aria-label="Monday 12 October 2026">12</button></td><td><button class="day" type="button" aria-label="Tuesday 13 October 2026">13</button></td><td><button class="day" type="button" aria-label="Wednesday 14 October 2026">14</button></td><td><button class="day" type="button" aria-label="Thursday 15 October 2026">15</button></td><td><button class="day" type="button" aria-label="Friday 16 October 2026">16</button></td><td><button class="day" type="button" aria-label="Saturday 17 October 2026" aria-disabled="true">17</button></td><td><button class="day" type="button" aria-label="Sunday 18 October 2026" aria-disabled="true">18</button></td></tr><tr><td><button class="day" type="button" aria-label="Monday 19 October 2026">19</button></td><td><button class="day" type="button" aria-label="Tuesday 20 October 2026">20</button></td><td><button class="day" type="button" aria-label="Wednesday 21 October 2026" aria-current="date">21</button></td><td><button class="day" type="button" aria-label="Thursday 22 October 2026">22</button></td><td><button class="day" type="button" aria-label="Friday 23 October 2026">23</button></td><td><button class="day" type="button" aria-label="Saturday 24 October 2026" aria-disabled="true">24</button></td><td><button class="day" type="button" aria-label="Sunday 25 October 2026" aria-disabled="true">25</button></td></tr><tr><td><button class="day" type="button" aria-label="Monday 26 October 2026">26</button></td><td><button class="day" type="button" aria-label="Tuesday 27 October 2026">27</button></td><td><button class="day" type="button" aria-label="Wednesday 28 October 2026" aria-pressed="true">28</button></td><td><button class="day" type="button" aria-label="Thursday 29 October 2026">29</button></td><td><button class="day" type="button" aria-label="Friday 30 October 2026">30</button></td><td><button class="day" type="button" aria-label="Saturday 31 October 2026" aria-disabled="true">31</button></td><td></td></tr></tbody>
</table>
<div class="acts"><button class="btn pri" type="button">Select</button><button class="btn" type="button">Close</button></div>
</div>
</div>
</div>
.ukc-input-moj-date-picker { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-input-moj-date-picker *, .ukc-input-moj-date-picker *::before, .ukc-input-moj-date-picker *::after { box-sizing: border-box; }
.ukc-input-moj-date-picker :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-input-moj-date-picker :where(ul, ol) { padding: 0; list-style: none; }
.ukc-input-moj-date-picker :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-input-moj-date-picker :where(a) { color: inherit; }
.ukc-input-moj-date-picker svg { flex: none; }
.ukc-input-moj-date-picker .dp { max-width: 340px; }
.ukc-input-moj-date-picker label { display: block; font-size: 17px; font-weight: 700; }
.ukc-input-moj-date-picker .hint { margin: 2px 0 8px; font-size: 14px; color: var(--uk-muted); }
.ukc-input-moj-date-picker .wrap { display: flex; }
.ukc-input-moj-date-picker input { width: 11.5em; height: 40px; padding: 5px 8px; border: 2px solid var(--uk-ink); border-right: 0; border-radius: var(--uk-radius-sm) 0 0 var(--uk-radius-sm); background: var(--uk-paper); font-variant-numeric: tabular-nums; }
.ukc-input-moj-date-picker input:focus { outline: 3px solid var(--uk-highlight); outline-offset: 0; box-shadow: inset 0 0 0 2px var(--uk-ink); }
.ukc-input-moj-date-picker .tog { width: 44px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 0 var(--uk-radius-sm) var(--uk-radius-sm) 0; background: var(--uk-ink); color: var(--uk-paper); cursor: pointer; }
.ukc-input-moj-date-picker .tog[aria-expanded="true"] { box-shadow: inset 0 -4px 0 var(--uk-accent); }
.ukc-input-moj-date-picker .tog:hover { background: color-mix(in srgb, var(--uk-ink) 82%, var(--uk-paper)); }
.ukc-input-moj-date-picker .dlg { width: max-content; margin-top: 8px; padding: 14px 16px 16px; border: 2px solid var(--uk-ink); border-radius: min(var(--uk-radius-lg), 8px); background: var(--uk-paper); box-shadow: var(--uk-shadow-float); }
.ukc-input-moj-date-picker .head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.ukc-input-moj-date-picker h2 { font-size: 16px; font-weight: 700; }
.ukc-input-moj-date-picker .nav { display: flex; }
.ukc-input-moj-date-picker .nav button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--uk-radius-sm); background: transparent; color: var(--uk-ink); cursor: pointer; }
.ukc-input-moj-date-picker .nav button:hover { background: var(--ink-soft); }
.ukc-input-moj-date-picker .cal { border-collapse: collapse; margin-bottom: 14px; }
.ukc-input-moj-date-picker th { height: 28px; font-size: 13px; font-weight: 700; }
.ukc-input-moj-date-picker td { padding: 0; }
.ukc-input-moj-date-picker .day { position: relative; width: 40px; height: 36px; border: 0; border-radius: 0; background: transparent; color: var(--uk-ink); font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; }
.ukc-input-moj-date-picker .day::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: transparent; }
.ukc-input-moj-date-picker .day:hover { background: var(--ink-soft); }
.ukc-input-moj-date-picker .day:focus-visible { outline: none; background: var(--uk-highlight); color: color-mix(in srgb, var(--uk-ink) 15%, black); }
.ukc-input-moj-date-picker .day:focus-visible::after { background: var(--uk-ink); }
.ukc-input-moj-date-picker .day[aria-current="date"] { box-shadow: inset 0 0 0 2px var(--uk-ink); }
.ukc-input-moj-date-picker .day[aria-pressed="true"] { background: var(--uk-accent); color: var(--uk-accent-ink); font-weight: 700; }
.ukc-input-moj-date-picker .day[aria-disabled="true"] { background: color-mix(in srgb, var(--uk-ink) 5%, var(--uk-paper)); color: var(--uk-muted); text-decoration: line-through; cursor: not-allowed; }
.ukc-input-moj-date-picker .acts { display: flex; gap: 10px; }
.ukc-input-moj-date-picker .btn { padding: 8px 14px 6px; border: 0; border-radius: var(--uk-radius-sm); background: var(--ink-soft); color: var(--uk-ink); font-weight: 600; box-shadow: 0 2px 0 var(--line-strong); cursor: pointer; }
.ukc-input-moj-date-picker .btn.pri { background: var(--uk-accent); color: var(--uk-accent-ink); box-shadow: 0 2px 0 var(--accent-deep); }
.ukc-input-moj-date-picker .btn:active { transform: translateY(2px); box-shadow: none; }
.ukc-input-moj-date-picker .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
More inputs
All 27To: Ridgeway job, 4 people
Press comma or Enter after each address. Up to 5.
- dispatch@norrlandtimber.se
- ana.ferreira@quaysideimports.pt
- gate3@kestrel
On this shipment