A date input expects a calendar date string. Be careful when converting the current instant because UTC and local dates can differ near midnight.
Worked example
// components/DateInputWithISODefault.tsx
export default function DateInputWithISODefault({
iso = "2027-03-14T15:30:00Z",
}: { iso?: string } = {}) {
return (
<label>
Event date <input type="date" defaultValue={iso.slice(0, 10)} />
</label>
);
}Implementation notes
A defaultValue initializes an uncontrolled field. Later changes to the default do not automatically overwrite an edit the visitor has already made.
Try it yourself
Open the component near a timezone boundary and inspect the default.
Open the React example →Editorial date October 18, 2026 · Published December 6, 2026