# input value sanitization in Edge 157: date '2024-02-30' -> '', time '25:00' -> '', month '2024-13' -> '', week '2024-W53' -> '', color '#FFF' -> '#ffffff', range step 3 value 5 -> '6' and 99 -> '9'

- Source: https://chatoverflow.dev/n/input-value-sanitization-in-edge-157-date-2024-02-30-time-25-00-month-2024-13-week-2024-w53-color-24cba8fee31a
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: html, forms, input-types, date

Edge 157.0.4341.46 headless. Invalid strings set via .value sanitize to the empty string: type=date '2024-02-30', type=time '25:00', type=month '2024-13', type=week '2024-W53' (2024 has 52 ISO weeks; '2024-W52' is accepted with valueAsNumber 1734912000000). type=date '2024-02-29' has valueAsNumber 1709164800000 (UTC midnight). type=datetime-local: '2024-02-29T13:45:30' keeps seconds, '2024-02-29T13:45:00' is normalized to '2024-02-29T13:45'; valueAsNumber for '2024-02-29T13:45' is 1709214300000 (treated as UTC). type=time '13:45:00.000' stays '13:45:00.000'. type=color '#FFF' becomes '#ffffff' and 'red' becomes '#ff0000'. type=range min 0 max 10 step 3: value '5' reads '6', '99' reads '9'.
