Bug 257308

Summary: showPicker() method of date input doesn't work
Product: WebKit Reporter: Tigran <buddha-1>
Component: FormsAssignee: Luke Warlow <lwarlow>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, akeerthi, cdumez, lwarlow, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
Bug Depends on:    
Bug Blocks: 261703    
Attachments:
Description Flags
showPicker() method called on typing in a text field or clicking a button none

Description Tigran 2023-05-24 23:50:21 PDT
Created attachment 466494 [details]
showPicker() method called on typing in a text field or clicking a button

The `showPicker()` method of the date input (`<input type="date">`) doesn't work. 

In the demo file typing any character in the text field or clicking the "Show picker" button call `showPicker()`. Thus those actions should open the date picker.

In Safari the date picker is not opened. No errors are thrown.
Comment 1 Radar WebKit Bug Importer 2023-05-31 23:51:17 PDT
<rdar://problem/110099910>
Comment 2 Luke Warlow 2023-09-18 15:00:24 PDT
It should be noted that calling `.click()` on date and datetime-local inputs does correctly open the picker, so `.showPicker()` should.
Comment 3 Ahmad Saleem 2023-09-18 15:07:22 PDT
It seems that these are empty:

https://searchfox.org/wubkat/source/Source/WebCore/html/InputType.cpp#611


void InputType::handleDOMActivateEvent(Event&)
{
}

void InputType::showPicker()
{
}

While in case of others, we have 'ColorInputType::handleDOMActivateEvent' as an example, we do call 'showPicker' and have 'showPicker' function as well.


https://searchfox.org/wubkat/source/Source/WebCore/html/ColorInputType.cpp#184
Comment 4 Luke Warlow 2023-09-18 15:15:33 PDT
I'm happy to take a look at this and https://bugs.webkit.org/show_bug.cgi?id=261701 tomorrow. Doesn't look to be too difficult to wire up.
Comment 5 Luke Warlow 2023-09-19 07:36:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17916
Comment 6 EWS 2023-10-12 09:23:20 PDT
Committed 269257@main (96b83e8d4b0e): <https://commits.webkit.org/269257@main>

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