diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2010-11-15 14:33:48 -0500 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2010-11-15 14:33:48 -0500 |
commit | 911956f5206cc5910f79d0d2605bde73decb88df (patch) | |
tree | 86a10d73b8479f670232ec5d7ef0bf31721e8c9d /jquery-ui-timepicker-addon.js | |
parent | ba5abba09910c13498c7b98efda89da77fcf49fd (diff) | |
download | jQuery-Timepicker-Addon-911956f5206cc5910f79d0d2605bde73decb88df.zip jQuery-Timepicker-Addon-911956f5206cc5910f79d0d2605bde73decb88df.tar.gz jQuery-Timepicker-Addon-911956f5206cc5910f79d0d2605bde73decb88df.tar.bz2 |
Fixed issue with dashes in input id
Diffstat (limited to 'jquery-ui-timepicker-addon.js')
-rwxr-xr-x | jquery-ui-timepicker-addon.js | 4 |
1 files 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; } |