diff --git a/.claude/scheduled_tasks.lock b/.claude/scheduled_tasks.lock new file mode 100644 index 00000000..54bd0f99 --- /dev/null +++ b/.claude/scheduled_tasks.lock @@ -0,0 +1 @@ +{"sessionId":"c83ad3f5-27f4-43e2-8c91-7793c8605d9c","pid":29547,"acquiredAt":1776638074373} \ No newline at end of file diff --git a/.dev.pid b/.dev.pid new file mode 100644 index 00000000..7c09f9fe --- /dev/null +++ b/.dev.pid @@ -0,0 +1 @@ +16440 diff --git a/src/features/flights-map/components/FlightsMapFilter.tsx b/src/features/flights-map/components/FlightsMapFilter.tsx index 92012117..70ed4f80 100644 --- a/src/features/flights-map/components/FlightsMapFilter.tsx +++ b/src/features/flights-map/components/FlightsMapFilter.tsx @@ -85,8 +85,14 @@ export const FlightsMapFilter: FC = ({ ); useEffect(() => { - if (!value.date) return; - const current = yyyymmddToDate(value.date); + // Mirrors Angular FlightsMapFiltersStateService.snapToNearestAvailable. + // With a date set, re-anchor it forward if it lands on a disabled day. + // With no date but a departure set, auto-fill to today (or next enabled + // day) — Angular runs snap from setDisabledDates after the calendar API + // responds, which seeds the input on first route selection. + if (!value.date && !value.departure) return; + + const current = value.date ? yyyymmddToDate(value.date) : new Date(); if (!current) return; const snapped = findNextEnabledDate(current, disabledDates, minDate, maxDate);