Table: RailsNotes
User: dreamable
Created at: 2020-12-18 23:10:48 UTC
Updated at: 2020-12-18 23:11:00 UTC
Reference:(Table ID 3, Record ID 10)

标题 :
HTML5 date picker doesn't show on Safari
笔记 :

jQuery date picker problem in Safari

  • 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
  • Although there is no native datepicker for Safari (or IE) a pretty good workaround is to add a placeholder attribute to the date input. This informs Safari and IE users which format the fallback text input should be (which is yyyy-mm-dd). The placeholder doesn't display on browsers that support type=date so this workaround won't affect other browsers.

    e.g. <input type="date" placeholder="yyyy-mm-dd" />
    
Tag: