From 999803035f9af4e66d5dfe483be39d2a98d902b3 Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Wed, 19 Jan 2011 16:01:33 -0500 Subject: [PATCH] Add enable and disable feature by wallenium. Feature not yet stable but doesnt impact rest of plugin --- jquery-ui-timepicker-addon.js | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 9dd6b6a..7f6e553 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -65,7 +65,8 @@ function Timepicker() { secondGrid: 0, alwaysSetTime: true, separator: ' ', - altFieldTimeOnly: true + altFieldTimeOnly: true, + showTimepicker: true }; $.extend(this._defaults, this.regional['']); } @@ -253,7 +254,8 @@ $.extend(Timepicker.prototype, { dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, ''); // Prevent displaying twice - if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0) { + //if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0) { + if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0 && o.showTimepicker) { var noDisplay = ' style="display:none;"', html = '
' + '