angularjs |日期输入未显示 ng-model 值 [英] angularjs | date input not showing ng-model value
本文介绍了angularjs |日期输入未显示 ng-model 值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
直到用户更改日期输入才显示日期
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?
推荐答案
我创建了一个简单的指令来使标准 input[type="date"]
表单元素能够与 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.
详情请看这里:https://github.com/betsol/angular-input-date
这是演示:http://jsfiddle.net/F2LcY/2/
希望有帮助!
这篇关于angularjs |日期输入未显示 ng-model 值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文