From 911956f5206cc5910f79d0d2605bde73decb88df Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Mon, 15 Nov 2010 14:33:48 -0500 Subject: [PATCH] Fixed issue with dashes in input id --- jquery-ui-timepicker-addon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 5eae144..0a10de7 100755 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -172,7 +172,7 @@ { var $dp = dp_inst.dpDiv; var opts = tp_inst.defaults; - var dp_id = dp_inst.id; + var dp_id = dp_inst.id.toString().replace(/([^A-Za-z0-9_])/g, ''); // Added by Peter Medeiros: // - Figure out what the hour/minute/second max should be based on the step values. @@ -549,7 +549,7 @@ var formattedDateTime = this.formattedDate; var timeAvailable = ((dt !== null && tp_inst.timeDefined) !== true)? false : true; - if (dp_inst.lastVal !== null && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) { + if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) { return; }