summaryrefslogtreecommitdiffstats
path: root/jquery-ui-timepicker-addon.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery-ui-timepicker-addon.js')
-rw-r--r--jquery-ui-timepicker-addon.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js
index a39c155..ed607fc 100644
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -767,6 +767,13 @@
timeAvailable = dt !== null && this.timeDefined;
this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
var formattedDateTime = this.formattedDate;
+
+ // if a slider was changed but datepicker doesn't have a value yet, set it
+ if(dp_inst.lastVal==""){
+ dp_inst.currentYear=dp_inst.selectedYear;
+ dp_inst.currentMonth=dp_inst.selectedMonth;
+ dp_inst.currentDay=dp_inst.selectedDay;
+ }
/*
* remove following lines to force every changes in date picker to change the input value