This time I will share jQuery Plugin and tutorial about Minimalist Month Picker Plugin with jQuery – monthPicker, hope it will help you in programming stack.
monthPicker is an extremely simple jQuery plugin that replaces any element with a month picker component. Click on the element you will see a popup containing a month picker with a year range selector.
How to use it:
1. Include the jQuery monthPicker plugin’s CSS file in the head section of the html document.
1 |
< link rel = "stylesheet" href = "css/jquery.monthpicker.css" > |
2. Call the function on the element and we’re ready to.
1 |
$( '#monthpicker' ).monthpicker({ |
3. Set custom year range.
1 |
$( '#monthpicker' ).monthpicker({ |
2 |
years: [2016, 2015, 2014, 2013, 2012], |
4. Set the space between your element and the month picker popup.
1 |
$( '#monthpicker' ).monthpicker({ |
2 |
years: [2016, 2015, 2014, 2013, 2012], |
5. Fire a callback function after month selection.
1 |
$( '#monthpicker' ).monthpicker({ |
2 |
years: [2016, 2015, 2014, 2013, 2012], |
4 |
onMonthSelect: function (m, y) { |
This awesome jQuery plugin is developed by lugolabs. For more Advanced Usages, please check the demo page or visit the official website.