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

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -