Components Forms
Date picker
Pick a date using the browser’s native calendar and keyboard controls.
Choose the date your print run should arrive.
Usage
Min, Max, and Value accept YYYY-MM-DD dates. The browser formats its display for the user’s locale and submits an ISO date under Name.
Register date-picker with Head and pass its properties to Render. Go setup guide
Go usage
err := mono.UI.Render(w, "date-picker", mono.Props{
"Hint": "Choose the date your print run should arrive.",
"Label": "Delivery date",
"Name": "delivery",
"Value": "2026-11-24",
})Rendered HTML
<div id="demo-date-picker" data-mono="date-picker" class="mu-stack">
<label for="demo-date-picker-date" class="mu-label">Delivery date</label>
<input class="mu-field" id="demo-date-picker-date" type="date" name="delivery" value="2026-11-24" aria-describedby="demo-date-picker-hint">
<p id="demo-date-picker-hint" class="mu-small mu-muted">Choose the date your print run should arrive.</p>
</div>Go template
<div id="{{.ID}}" data-mono="date-picker" class="mu-stack">
<label for="{{.ID}}-date" class="mu-label">{{.Label}}</label>
<input class="mu-field" id="{{.ID}}-date" type="date" name="{{or .Name .ID}}" value="{{.Value}}" {{if .Min}}min="{{.Min}}"{{end}} {{if .Max}}max="{{.Max}}"{{end}} {{if .Required}}required{{end}} {{if .Disabled}}disabled{{end}} {{if .Hint}}aria-describedby="{{.ID}}-hint"{{end}}>
{{if .Hint}}<p id="{{.ID}}-hint" class="mu-small mu-muted">{{.Hint}}</p>{{end}}
</div>Use the HTML in a static site
Copy the rendered HTML above. Download these assets into the same folder as your page, then add the tags below to its head.
<link rel="stylesheet" href="./base.css">Copy into your project
Run this command from the Mono checkout. Set -out to the component directory in your application.
go run ./cmd/mono-ui add -out ./components date-pickerExample properties (JSON)
{
"Hint": "Choose the date your print run should arrive.",
"Label": "Delivery date",
"Name": "delivery",
"Value": "2026-11-24"
}