Start/end date selector.
<fieldset class="drp">
<legend class="drp__legend">Trip dates</legend>
<div class="drp__row">
<label class="drp__field">
<span class="drp__sub">Start</span>
<input class="drp__input" type="date" value="2026-09-01" style="--accent:#A8E6C1;" autocomplete="off">
</label>
<span class="drp__sep" aria-hidden="true">→</span>
<label class="drp__field">
<span class="drp__sub">End</span>
<input class="drp__input" type="date" value="2026-09-08" style="--accent:#A8E6C1;" autocomplete="off">
</label>
</div>
</fieldset>
<style>
.drp { font: 14px system-ui, sans-serif; color: #241430; max-width: 340px; border: none; padding: 0; margin: 0; }
.drp__legend { font-weight: 500; margin-bottom: 6px; padding: 0; }
.drp__req { color: #241430; }
.drp__row { display: flex; align-items: flex-end; gap: 8px; }
.drp__field { display: block; flex: 1; }
.drp__sub { display: block; margin-bottom: 4px; font-size: 12px; color: #24143099; }
.drp__input { width: 100%; box-sizing: border-box; padding: 9px 10px; font: inherit; color: #241430; background: #FAF7F2; border: 1.5px solid #24143040; border-radius: 8px; }
.drp__input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.drp__sep { padding-bottom: 10px; color: #24143080; }
</style><fieldset class="max-w-[340px] font-sans text-sm text-[#241430] border-0 p-0 m-0">
<legend class="font-medium mb-1.5 p-0">Trip dates</legend>
<div class="flex items-end gap-2">
<label class="block flex-1">
<span class="block mb-1 text-xs text-[#24143099]">Start</span>
<input type="date" value="2026-09-01" autocomplete="off" class="drp-tw w-full box-border px-2.5 py-2 bg-[#FAF7F2] border-[1.5px] border-[#24143040] rounded-lg focus-visible:outline-none" style="border-color:#A8E6C1;">
</label>
<span class="pb-2.5 text-[#24143080]" aria-hidden="true">→</span>
<label class="block flex-1">
<span class="block mb-1 text-xs text-[#24143099]">End</span>
<input type="date" value="2026-09-08" autocomplete="off" class="drp-tw w-full box-border px-2.5 py-2 bg-[#FAF7F2] border-[1.5px] border-[#24143040] rounded-lg focus-visible:outline-none" style="border-color:#A8E6C1;">
</label>
</div>
</fieldset>export function DateRangePicker({
label = "Trip dates",
start = "2026-09-01",
end = "2026-09-08",
accent = "#A8E6C1",
required = false,
}) {
const inputStyle = {
width: "100%", boxSizing: "border-box", padding: "9px 10px", font: "inherit", color: "#241430",
background: "#FAF7F2", border: "1.5px solid #24143040", borderRadius: 8,
};
return (
<fieldset style={{ maxWidth: 340, fontFamily: "system-ui, sans-serif", fontSize: 14, color: "#241430", border: "none", padding: 0, margin: 0 }}>
<legend style={{ fontWeight: 500, marginBottom: 6, padding: 0 }}>{label}{required && " *"}</legend>
<div style={{ display: "flex", alignItems: "flex-end", gap: 8 }}>
<label style={{ display: "block", flex: 1 }}>
<span style={{ display: "block", marginBottom: 4, fontSize: 12, color: "#24143099" }}>Start</span>
<input type="date" defaultValue={start} required={required} autoComplete="off" style={inputStyle} />
</label>
<span aria-hidden="true" style={{ paddingBottom: 10, color: "#24143080" }}>→</span>
<label style={{ display: "block", flex: 1 }}>
<span style={{ display: "block", marginBottom: 4, fontSize: 12, color: "#24143099" }}>End</span>
<input type="date" defaultValue={end} required={required} autoComplete="off" style={{ ...inputStyle, borderColor: accent }} />
</label>
</div>
</fieldset>
);
}