Chrome type=“date” and jquery ui date picker clashing

前端 未结 6 734
再見小時候
再見小時候 2020-12-15 08:06

I have a input box having type=\"date\", everything works fine in IE but in latest version of Chrome it comes with a spinner, Down arrow and with a placeholder of mm/dd/yyyy

6条回答
  •  轮回少年
    2020-12-15 08:39

    I handled in a tricky way, i have my date field as type="text" and i have added an attribute as data-type="date"

    In jquery, i am running a code to dynamically replace type="text & data-type="date" to type="date", so the browser doesn't make it a date field on load but my jquery ui datepicker is called as i am dynamically adding it as type="date"... :)

    Hope it is helpful to someone..

提交回复
热议问题