Repository navigation
Commit 6a487b2
Fix: ISO 8601 compliant year formatting in TimePicker (#75343)
* Fix: ISO 8601 compliant year formatting in TimePicker
Adds zero-padding to years in date string construction to ensure ISO 8601 compliance. Years below 1000 are now properly formatted (e.g., year 999 becomes '0999') preventing Invalid Date errors.
This is a minimal fix that only changes the internal date string formatting in setInConfiguredTimezone().
* Update CHANGELOG with PR number #75343
* Fix TypeScript error: remove minYear prop that doesn't exist on trunk
* Add YearBelow1000 story to demonstrate zero-padding behavior
* Remove dedicated YearBelow1000 story - not needed
* Add input value assertion to ISO 8601 test
* Add input value assertion after change
* Add explicit zero-padding assertion to test
Test now extracts year from output and verifies it's '0500' (zero-padded to 4 digits)
* Fix test indentation per ESLint
Co-authored-by: getdave <get_dave@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>1 parent 28f976d commit 6a487b2
3 files changed
Lines changed: 44 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
594 | 636 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
0 commit comments