lucianocosta / jquery.mtz.monthpicker

Monthpicker, the missing JQuery widget.
http://lucianocosta.com.br/jquery.mtz.monthpicker
96 stars 57 forks source link

Save clicked month #13

Closed mjdeslon closed 12 years ago

mjdeslon commented 12 years ago

In issue #3 https://github.com/lucianocosta/jquery.mtz.monthpicker/pull/3". He says he added the retention of the clicked month...is this in the current build or was it never added?

Michael

lucianocosta commented 12 years ago

That pull was not merged. Please take a look at the "Events" section of the docs: http://lucianocosta.info/jquery.mtz.monthpicker

If you need to know the month clicked, try this:

$('#your_widget_id').monthpicker().bind('monthpicker-click-month', function (e, month) {
    alert('You clicked on month ' + month);
});
mjdeslon commented 12 years ago

Absolutly love this plugin. I was just coming to post my solution...you respond way to quickly!

$('#custom').monthpicker().bind ( 'monthpicker-click-month', function (e, month) { $('#custom').monthpicker('disableMonths', []); $('#custom').monthpicker('disableMonths', [month]); } );//end monthpicker bind