Angular.js and HTML5 date input value — how to get Firefox to show a readable date value in a date input?

前端 未结 7 2012
無奈伤痛
無奈伤痛 2020-12-12 13:26

I have an HTML5 date input and I would like its value to be set to the value of the date property in my model by default. I\'m not too fussy about formatting since Chrome se

7条回答
  •  生来不讨喜
    2020-12-12 14:21

    If using Angular Material Design, you can use the datepicker component there and this will work in Firefox, IE etc.

    https://material.angularjs.org/latest/demo/datepicker

    Fair warning though - personal experience is that there are problems with this, and seemingly it is being re-worked at present. See here:

    https://github.com/angular/material/issues/4856

提交回复
热议问题