Bug 239778

Summary: Datetime-local Field Picker Shows Incorrect Date
Product: WebKit Reporter: me
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, cdumez, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: macOS 12   
Attachments:
Description Flags
Preview of bug none

Description me 2022-04-26 10:59:42 PDT
Created attachment 458380 [details]
Preview of bug

It seems the datetime-local field type has a bug where if the seconds end in :00, when you click into the field and it shows the calendar popup it defaults to Dec 2000 w/ Jan 1 2001 selected. If you use any seconds beyond :00, it works fine.

JSFiddle attached, example uses `<input type="datetime-local" value="2017-05-12T19:30:00" step="1">` to show the error.

https://jsfiddle.net/vwyk05gj/
Comment 1 me 2022-04-26 11:00:16 PDT
(Submitted via Feedback also, FB9996513)
Comment 2 Aditya Keerthi 2022-04-26 11:30:02 PDT
rdar://92344761
Comment 3 Mike Wyrzykowski 2022-06-07 13:04:56 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1355
Comment 4 EWS 2022-06-07 17:27:38 PDT
Committed r295369 (251377@main): <https://commits.webkit.org/251377@main>

Reviewed commits have been landed. Closing PR #1355 and removing active labels.