"use client"; import { useRouter } from "next/navigation"; interface StopsDatePickerProps { value: Date; } /** * Format a Date as the `YYYY-MM-DD` value used by ``. * * Uses local-time components (not `toISOString()`) so the picker doesn't * snap to the day before/after for users in a non-UTC timezone — a date * picker where selecting "today" in the user's browser unexpectedly * changes the URL by a day is a common footgun. */ function toInputValue(d: Date): string { const yyyy = d.getFullYear(); const mm = String(d.getMonth() + 1).padStart(2, "0"); const dd = String(d.getDate()).padStart(2, "0"); return `${yyyy}-${mm}-${dd}`; } /** * StopsDatePicker — native `` for the v2 stops list. * * Pushing a new URL on change triggers a server re-render of the page * with the new date. The page's `searchParams.date` is the source of * truth; this component is purely an input control. * * The pill is sized at 56px to match the rest of the v2 action bar * (matching OrdersFilterButton). */ export function StopsDatePicker({ value }: StopsDatePickerProps) { const router = useRouter(); return ( ); } export default StopsDatePicker;