From 92e3deeda6d7b0f810b57de239d141b302d68187 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 2 Oct 2015 04:54:46 -0500 Subject: [PATCH 1/2] added setDisabled function added a new function on the combodate disabling all selectboxes --- src/combodate.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/combodate.js b/src/combodate.js index df0a8d4..7aa2687 100644 --- a/src/combodate.js +++ b/src/combodate.js @@ -468,6 +468,15 @@ } }, + setDisabled: function(disbled) { + var that = this; + $.each(this.map, function (k) { + if (that['$' + k]) { + that['$' + k].prop('disabled', disbled) + } + }); + }, + leadZero: function(v) { return v <= 9 ? '0' + v : v; }, @@ -475,9 +484,7 @@ destroy: function() { this.$widget.remove(); this.$element.removeData('combodate').show(); - } - - //todo: clear method + }, }; $.fn.combodate = function ( option ) { From 218118e535ad03959c53ab888dfc93ba80ff6040 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 2 Oct 2015 05:13:25 -0500 Subject: [PATCH 2/2] readded comment --- src/combodate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/combodate.js b/src/combodate.js index 7aa2687..be8f5bb 100644 --- a/src/combodate.js +++ b/src/combodate.js @@ -484,7 +484,9 @@ destroy: function() { this.$widget.remove(); this.$element.removeData('combodate').show(); - }, + } + + //todo: clear method }; $.fn.combodate = function ( option ) {