javascript - How to disable future month and year in monthpicker -


I am using the month picker, I want to prevent users from choosing future months and years. How can I achieve that ? I tried

  $ ("# month"). Monthpicker ({dateFormat: 'M-yy', autoSize: true, changeYear: true, changeMonth: true, showButtonPanel: true, maxDate: new date (.) GetMonth ()});  

But with this I can only restrict the future year, I can still choose the future month. Any help would be appreciated.

By default, the year limit starts 10 years ago and ends in 10 years

};

  $ ('#custom_widget') monthpicker (option).  

You can try this it is working for me.

  $ ('# my_widget'). Monthpicker ('disable', [1, 2, 11, 12]); $ ('# My_widget') Month picture ('disabled demand', []); // re-enables all months  

from context:


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -