Angular -ui-bootstrap datepicker and masked input

I am taking the first steps in Angular and hope that I am in the right place to find the answer to my question / question. If not, point me in the right direction.

I am using popup datepicker bootstrap Angular UI, as an example here: http://angular-ui.imtqy.com/bootstrap/#/datepicker

When I combine this with the uiMask directive ( http://angular-ui.imtqy.com/ui-utils/ ), the values ​​in the input are scrambled when I select the date.

I suspect because of the difference in the Angular model type: datepicker wants a JS object Date / ui.mask wants a (hidden) string.

When the selected date is formatted / parsed using uiMask, this happens incorrectly: - /

Am I trying to make this even possible?

Regards, Tom.

+6
source share
1 answer

I am interested to know the answer. Here is an example of combining ui-mask with 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" /> 
0
source

All Articles