daysAgoToISODate built the date at local midnight but formatted it with toISOString(), which converts to UTC first -- in any timezone ahead of UTC (e.g. Europe/Paris), local midnight is still the previous day in UTC, so the picker displayed a date one day earlier than the one that was actually selected/stored. Format from the Date's local year/month/day components instead of going through UTC.