Minimalist Month Picker Plugin with jQuery monthPicker - Download Minimalist Month Picker Plugin with jQuery - monthPicker

Download Minimalist Month Picker Plugin with jQuery – monthPicker

Posted on

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.

Minimalist Month Picker Plugin with jQuery monthPicker - Download Minimalist Month Picker Plugin with jQuery - monthPicker
File Size: 27 KB
Views Total: 3241
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   



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({
2   // options here
3 });

3. Set custom year range.

1 $('#monthpicker').monthpicker({
2   years: [2016, 2015, 2014, 2013, 2012],
3 });

4. Set the space between your element and the month picker popup.

1 $('#monthpicker').monthpicker({
2   years: [2016, 2015, 2014, 2013, 2012],
3   topOffset: 6
4 });

5. Fire a callback function after month selection.

1 $('#monthpicker').monthpicker({
2   years: [2016, 2015, 2014, 2013, 2012],
3   topOffset: 6,
4   onMonthSelect: function(m, y) {
5     // do something
6   }
7 });

This awesome jQuery plugin is developed by lugolabs. For more Advanced Usages, please check the demo page or visit the official website.




source : jqueryscript.net