From ba5abba09910c13498c7b98efda89da77fcf49fd Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Mon, 15 Nov 2010 14:25:18 -0500 Subject: [PATCH] Fixed undefined dp_inst.lastVal --- README | 5 +++++ jquery-ui-timepicker-addon.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README b/README index e69de29..15fb705 100644 --- a/README +++ b/README @@ -0,0 +1,5 @@ +jQuery Timepicker Addon + +-To use this plugin you must include jQuery and jQuery UI with datepicker +-Include timepicker-addon script +-now use timepicker with $('#selector').datetimepicker() or $('#selector').timepicker() diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 14de95e..5eae144 100755 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -549,7 +549,7 @@ var formattedDateTime = this.formattedDate; var timeAvailable = ((dt !== null && tp_inst.timeDefined) !== true)? false : true; - if (dp_inst.lastVal.length > 0 && this.$input.val().length === 0) { + if (dp_inst.lastVal !== null && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) { return; }