我在Angular上迈出了我的第一步&希望我在正确的地方找到了我的问题的答案。如果没有,请告诉我正确的方向。
我使用的是angular UI bootstrap弹出日期选择器,如下面的示例:http://angular-ui.github.io/bootstrap/#/datepicker
当我将其与uiMask指令( http://angular-ui.github.io/ui-utils/)结合使用时,当我选择日期时,输入中的值就会变得混乱。
我怀疑是因为角度模型的类型不同: datepicker想要JS Date对象/ ui.mask想要(屏蔽的)字符串。
当挑选的日期被uiMask格式化/解析时,它会出错:-/
我想要做的事情有可能实现吗?
好的问候,汤姆。
发布于 2014-09-25 02:14:54
我有兴趣知道答案。下面是将ui掩码与datepicker结合使用的示例:http://plnkr.co/edit/88ax7pkiEhsD5b74q3Bf?p=preview
<input type="text" class="form-control" ui-mask="99/99/9999" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />https://stackoverflow.com/questions/23044727
复制相似问题