angularjs |输入的日期不显示NG-模型值 [英] angularjs | date input not showing ng-model value
本文介绍了angularjs |输入的日期不显示NG-模型值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
日期输入没有显示,直到用户更改日期
date input is not showing the date until the user change it
// showing the date
<p>{{someDate | date}}</p>
// not showing the date. instead showing mm/dd/yyyy.
// but value will change when use change is
<input type="date" ng-model="someDate">
我需要它的稳定版1.2.14工作。
这可能吗?
I need it to work on stable version 1.2.14. is it possible?
推荐答案
我创建了一个简单的指令,以使标准输入[类型=日期]
表单元素与AngularJS正常工作〜1.2.16。
I've created a simple directive to enable standard input[type="date"]
form elements to work correctly with AngularJS ~1.2.16.
请看看这里的详细信息:
<一href=\"https://github.com/betsol/angular-input-date\">https://github.com/betsol/angular-input-date
Please look here for details: https://github.com/betsol/angular-input-date
和这里的演示:
http://jsfiddle.net/F2LcY/2/
希望它帮助!
这篇关于angularjs |输入的日期不显示NG-模型值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文