Hi,
First of all, let me tell you that moment picker is beautiful.
I am pretty new to the picker. What I'm trying to do is to restrict my moment-picker till the previous month.For this, I'm setting the data-max-date in HTML to moment().subtract(1,"M").format("MMM-YYYY") through JS controller.
Also, in my JS service class, I've enabled the elements to be pre-populated with the previous month. But, after form submission, even though the previous month is enabled in moment-picker, selecting that is giving me a ng-invalid-max error.
Unfortunately the code isn't mine to share. I hope I've made the facts clear.
Your thoughts on the matter will be a great help.
Hi, First of all, let me tell you that moment picker is beautiful. I am pretty new to the picker. What I'm trying to do is to restrict my moment-picker till the previous month.For this, I'm setting the data-max-date in HTML to moment().subtract(1,"M").format("MMM-YYYY") through JS controller. Also, in my JS service class, I've enabled the elements to be pre-populated with the previous month. But, after form submission, even though the previous month is enabled in moment-picker, selecting that is giving me a ng-invalid-max error. Unfortunately the code isn't mine to share. I hope I've made the facts clear. Your thoughts on the matter will be a great help.
Cheers!