Day, month, year
Three short fields for a date, each labelled, sized to the number of digits it takes.
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-govuk-date">
<fieldset>
<legend>When did the job start?</legend>
<p class="hint">For example, 27 3 2026</p>
<div class="parts">
<label>Day<input type="text" inputmode="numeric" class="w2" value="14"></label>
<label>Month<input type="text" inputmode="numeric" class="w2" value="10"></label>
<label>Year<input type="text" inputmode="numeric" class="w4" value="2026"></label>
</div>
</fieldset>
</div>
.ukc-input-govuk-date { 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-govuk-date *, .ukc-input-govuk-date *::before, .ukc-input-govuk-date *::after { box-sizing: border-box; }
.ukc-input-govuk-date :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-input-govuk-date :where(ul, ol) { padding: 0; list-style: none; }
.ukc-input-govuk-date :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-input-govuk-date :where(a) { color: inherit; }
.ukc-input-govuk-date svg { flex: none; }
.ukc-input-govuk-date fieldset { border: 0; padding: 0; margin: 0; }
.ukc-input-govuk-date legend { font-weight: 700; font-size: 19px; margin-bottom: 4px; }
.ukc-input-govuk-date .hint { color: var(--uk-muted); margin-bottom: 10px; }
.ukc-input-govuk-date .parts { display: flex; gap: 16px; }
.ukc-input-govuk-date label { display: grid; gap: 4px; }
.ukc-input-govuk-date input { height: 40px; padding: 5px; border: 2px solid var(--uk-ink); border-radius: 0; background: var(--uk-paper); font-size: 19px; }
.ukc-input-govuk-date .w2 { width: 3.4em; } .ukc-input-govuk-date .w4 { width: 5.4em; }
More inputs
All 27Great names are short and memorable.
You can change this later.
Enter a number, like 12000.
- Street and numberEnter a 5 digit ZIP code
One email a month. Unsubscribe from any issue.
- /