Bug 257308 - showPicker() method of date input doesn't work
Summary: showPicker() method of date input doesn't work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Luke Warlow
URL:
Keywords: InRadar
Depends on:
Blocks: 261703
  Show dependency treegraph
 
Reported: 2023-05-24 23:50 PDT by Tigran
Modified: 2023-10-12 09:23 PDT (History)
6 users (show)

See Also:


Attachments
showPicker() method called on typing in a text field or clicking a button (705 bytes, text/html)
2023-05-24 23:50 PDT, Tigran
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.