The showPicker() method is a new addition to HTMLInputElement which addresses a very common request from web developers: programmatically showing a picker for controls like date etc. <input id="dateInput" type="date"> <button onclick="dateInput.showPicker()">Show the date picker</button> WHATWG Spec PR: https://github.com/whatwg/html/pull/7319
<rdar://problem/86287452>
*** This bug has been marked as a duplicate of bug 237192 ***
bug 237192 probably only covers part of this feature.
(In reply to zsun from comment #3) > bug 237192 probably only covers part of this feature. What part did it cover, and what part didn't it cover? It's not clear from either bug what has been implemented.
(In reply to Sam Sneddon [:gsnedders] from comment #4) > (In reply to zsun from comment #3) > > bug 237192 probably only covers part of this feature. > > What part did it cover, and what part didn't it cover? It's not clear from > either bug what has been implemented. The work on showPicker were motivated by three WPT tests show-picker-disabled-readonly.html, show-picker-user-gesture.html and show-picker-cross-origin-iframe.html. Just checked wpt.fyi, apart from show-picker-disabled-readonly.html, the other two tests pass for Safari now. For show-picker-disabled-readonly.html, basically it should throw for input that is readonly/disable. We have this part function in place. However, readonly should only applies to text only input types + <textarea>. In WebKit we need to follow specs and restrict the readonly attribute to the listed types. This is the part we need to do (see bug https://bugs.webkit.org/show_bug.cgi?id=240343).
I think it's reasonable to make this bug a duplicate and track remaining work in subsequent bugs. *** This bug has been marked as a duplicate of bug 237192 ***
I've put followups as a dependency of bug 237192