Fixed altField implementation
This commit is contained in:
parent
6ae78e06be
commit
94ea439217
10
jquery-ui-timepicker-addon.js
vendored
10
jquery-ui-timepicker-addon.js
vendored
|
@ -472,12 +472,13 @@
|
||||||
formattedDateTime = this.formattedTime;
|
formattedDateTime = this.formattedTime;
|
||||||
}
|
}
|
||||||
else if (this.defaults.timeOnly !== true && (this.defaults.alwaysSetTime || timeAvailable)) {
|
else if (this.defaults.timeOnly !== true && (this.defaults.alwaysSetTime || timeAvailable)) {
|
||||||
formattedDateTime += ' ' + this.formattedTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((this.$altInput) && this.$altInput != null)
|
if ((this.$altInput) && this.$altInput != null)
|
||||||
{
|
{
|
||||||
this.$altInput.val(formattedDateTime);
|
this.$altInput.val(this.formattedTime);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
formattedDateTime += ' ' + this.formattedTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formattedDateTime = formattedDateTime;
|
this.formattedDateTime = formattedDateTime;
|
||||||
|
@ -518,6 +519,7 @@
|
||||||
tp.second = tp.defaults.second;
|
tp.second = tp.defaults.second;
|
||||||
tp.ampm = '';
|
tp.ampm = '';
|
||||||
tp.$input = $(input);
|
tp.$input = $(input);
|
||||||
|
if(opts.altField != undefined && opts.altField != '')
|
||||||
tp.$altInput = $($.datepicker._get(inst, 'altField'));
|
tp.$altInput = $($.datepicker._get(inst, 'altField'));
|
||||||
tp.inst = inst;
|
tp.inst = inst;
|
||||||
tp.addTimePicker(inst);
|
tp.addTimePicker(inst);
|
||||||
|
|
Loading…
Reference in a new issue