标签: html angularjs
我的表单上有一个输入字段,它应该接受输入为数字。
但是,当用户输入时,我想以hh:mm格式格式化此输入数字?我对使用input type = time没兴趣。
hh:mm
input type = time
有什么想法吗?
答案 0 :(得分:1)
您可以编写自定义过滤器:
阅读这篇文章:https://docs.angularjs.org/api/ng/filter/date
或此主题:How can I show correctly Dates yyyy-MM-dd hh:mm:ss with HTML5 and Angularjs?