indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
525 stars 226 forks source link

Setting min date value overwrites my existing value #198

Open dkozul opened 7 years ago

dkozul commented 7 years ago

I have moment picker set up like this:

<input min-date="vm.today"
moment-picker="vm.formattedDatumPrikazivanja"
ng-model="vm.obavijest.DatumPrikazivanja"
ng-model-options="{ updateOn: 'blur' }">

Now ng-model has existing value fetched from server and i want this value to be show but instead it shows value from variable vm.today.

What i want is to show existing value from server (vm.obavijest.DatumPrikazivanja) if exists in input but disable picking value from picker if i want to update that value that is less than value in "today" (vm.today) variable.

Thanks for help.