Tom*_*Tom 6 angularjs angular-ui angular-ui-bootstrap angular-bootstrap
我正在采取Angular的第一步,并希望我在正确的位置找到我的问题/问题的答案.如果没有,请指出我正确的方向.
我正在使用角度UI引导弹出日期选择器,如下例所示:http: //angular-ui.github.io/bootstrap/#/datepicker
当我将其与uiMask指令(http://angular-ui.github.io/ui-utils/)结合使用时,当我选择日期时,输入中的值会被加扰.
我怀疑是因为角度模型的类型不同:datepicker想要JS Date对象/ ui.mask想要(蒙面)字符串.
当选择的日期被uiMask格式化/解析时,它会出错: - /
我想做什么甚至可能?
亲切的问候,汤姆.
小智 0
我有兴趣知道答案。以下是将 ui-mask 与日期选择器相结合的示例: 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" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5136 次 |
| 最近记录: |