Search code examples
htmlsafari

HTML5 date picker doesn't show on Safari


Having previously used jQuery date picker, I have now converted some of the date fields in forms on my website to the HTML5 date picker.

On the documentation, it says Safari is supported: however, it currently shows just a text field (whereas Chrome and other browsers show the date picker correctly).

echo "<input type='date' name='Date' min='$todaymin'>";

(the same applied without the min attribute)

This is my code line - am I doing something wrong or am I just reading the documentation wrong and it is NOT supported in Safari?

Thank you!


Solution

  • 2021/04/29 update: support has been added to Safari 14.1

    https://webkit.org/blog/11648/new-webkit-features-in-safari-14-1/


    Safari does not include a native datepicker for its desktop version (although it does for iOS). Incidentally, neither does IE. It's very frustrating as it could save developers a lot of time if they did.

    This is a useful link for tracking support for it: http://caniuse.com/#feat=input-datetime