zonedDateTime.toString()
returns invalid string when year is < 1884
#7539
Labels
zonedDateTime.toString()
returns invalid string when year is < 1884
#7539
Provide a general summary of the issue here
.toString()
returns datetime string which is not valid. Offset part is incorrect. It also displays incvalid timezone offset inDateInput
field.🤔 Expected Behavior?
.toString()
should return valid string, that can be parsed back😯 Current Behavior
parseZonedDateTime
throws error💁 Possible Solution
I think it's related to issue that was discussed here: #3924. My guess is that something similar needs to be done when getting(setting?) zoned date time offset.
🔦 Context
In app I'm working on
<DateInput />
values are used as string and gets updated inonChange
. User types in year (e.g. 2024) all good up to this point. But once backspace is pressed, year becomes202
and things break.🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/zlvx8s
Version
"react-aria-components": "1.5.0" / "@internationalized/date": "3.6.0" (happens in previous version too)
What browsers are you seeing the problem on?
Safari
If other, please specify.
No response
What operating system are you using?
macOS 15.1.1 (24B91)
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: