add time to selected date when select from keyboard

This commit is contained in:
t1m0n 2016-05-05 16:39:22 +03:00
parent 920bab5032
commit af3f0ec3cd
3 changed files with 10 additions and 2 deletions

View File

@ -1097,6 +1097,10 @@
var alreadySelected = this._isSelected(this.focused, this.cellType);
if (!alreadySelected) {
if (this.timepicker) {
this.focused.setHours(this.timepicker.hours);
this.focused.setMinutes(this.timepicker.minutes);
}
this.selectDate(this.focused);
} else if (alreadySelected && this.opts.toggleSelected){
this.removeDate(this.focused);

File diff suppressed because one or more lines are too long

View File

@ -1097,6 +1097,10 @@
var alreadySelected = this._isSelected(this.focused, this.cellType);
if (!alreadySelected) {
if (this.timepicker) {
this.focused.setHours(this.timepicker.hours);
this.focused.setMinutes(this.timepicker.minutes);
}
this.selectDate(this.focused);
} else if (alreadySelected && this.opts.toggleSelected){
this.removeDate(this.focused);