summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2010-11-15 14:25:18 -0500
committerTrent Richardson <trentdrichardson@gmail.com>2010-11-15 14:25:18 -0500
commitba5abba09910c13498c7b98efda89da77fcf49fd (patch)
tree1e164c58a3285433f1a97663242528b5ae90c8da
parentb4c322c657aea1db12c260e9de60ae49dbc4d039 (diff)
downloadjQuery-Timepicker-Addon-ba5abba09910c13498c7b98efda89da77fcf49fd.zip
jQuery-Timepicker-Addon-ba5abba09910c13498c7b98efda89da77fcf49fd.tar.gz
jQuery-Timepicker-Addon-ba5abba09910c13498c7b98efda89da77fcf49fd.tar.bz2
Fixed undefined dp_inst.lastVal
-rw-r--r--README5
-rwxr-xr-xjquery-ui-timepicker-addon.js2
2 files changed, 6 insertions, 1 deletions
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;
}