From 3f8473cbf33a1220f065e36612b307d0be823e30 Mon Sep 17 00:00:00 2001 From: Sam Auciello Date: Sat, 3 Aug 2013 12:28:50 -0400 Subject: [PATCH 1/3] fixed #41 --- jquery.mtz.monthpicker.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.mtz.monthpicker.js b/jquery.mtz.monthpicker.js index 09c6627..943b3ee 100755 --- a/jquery.mtz.monthpicker.js +++ b/jquery.mtz.monthpicker.js @@ -110,6 +110,11 @@ }, show: function () { + $('#' + this.data('monthpicker').settings.id).remove(); + $(this).monthpicker( + 'mountWidget', + $(this).data('monthpicker').settings + ); $(this).monthpicker('hideAll'); var widget = $('#' + this.data('monthpicker').settings.id); widget.css("top", this.offset().top + this.outerHeight()); From 1759cef7c6a21a6f7492d8d637da255950196115 Mon Sep 17 00:00:00 2001 From: Sam Auciello Date: Sat, 3 Aug 2013 14:13:49 -0400 Subject: [PATCH 2/3] added comments documenting the change --- jquery.mtz.monthpicker.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jquery.mtz.monthpicker.js b/jquery.mtz.monthpicker.js index 943b3ee..c361a51 100755 --- a/jquery.mtz.monthpicker.js +++ b/jquery.mtz.monthpicker.js @@ -110,11 +110,15 @@ }, show: function () { + + // rebuild the ui container to incorporate settings from data attributes that may have been changed $('#' + this.data('monthpicker').settings.id).remove(); $(this).monthpicker( 'mountWidget', $(this).data('monthpicker').settings ); + + // display the ui container $(this).monthpicker('hideAll'); var widget = $('#' + this.data('monthpicker').settings.id); widget.css("top", this.offset().top + this.outerHeight()); From 66b348677fb6f51f6a8f031a82f810d88aaa165e Mon Sep 17 00:00:00 2001 From: Sam Auciello Date: Fri, 16 Aug 2013 17:18:57 +0000 Subject: [PATCH 3/3] fixing disabled-state --- jquery.mtz.monthpicker.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jquery.mtz.monthpicker.js b/jquery.mtz.monthpicker.js index c361a51..4d92b2b 100755 --- a/jquery.mtz.monthpicker.js +++ b/jquery.mtz.monthpicker.js @@ -256,6 +256,9 @@ } td.append(settings.monthNames[i-1]); tr.append(td).appendTo(tbody); + if ($.inArray(i, settings.disabledMonths) >= 0) { + td.addClass('ui-state-disabled') + } if (i % 3 === 0) { tr = $(''); }