mirror of
https://github.com/frappe/air-datepicker.git
synced 2026-01-14 11:01:22 +08:00
add time to selected date when select from keyboard
This commit is contained in:
parent
920bab5032
commit
af3f0ec3cd
4
dist/js/datepicker.js
vendored
4
dist/js/datepicker.js
vendored
@ -1097,6 +1097,10 @@
|
|||||||
var alreadySelected = this._isSelected(this.focused, this.cellType);
|
var alreadySelected = this._isSelected(this.focused, this.cellType);
|
||||||
|
|
||||||
if (!alreadySelected) {
|
if (!alreadySelected) {
|
||||||
|
if (this.timepicker) {
|
||||||
|
this.focused.setHours(this.timepicker.hours);
|
||||||
|
this.focused.setMinutes(this.timepicker.minutes);
|
||||||
|
}
|
||||||
this.selectDate(this.focused);
|
this.selectDate(this.focused);
|
||||||
} else if (alreadySelected && this.opts.toggleSelected){
|
} else if (alreadySelected && this.opts.toggleSelected){
|
||||||
this.removeDate(this.focused);
|
this.removeDate(this.focused);
|
||||||
|
|||||||
4
dist/js/datepicker.min.js
vendored
4
dist/js/datepicker.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1097,6 +1097,10 @@
|
|||||||
var alreadySelected = this._isSelected(this.focused, this.cellType);
|
var alreadySelected = this._isSelected(this.focused, this.cellType);
|
||||||
|
|
||||||
if (!alreadySelected) {
|
if (!alreadySelected) {
|
||||||
|
if (this.timepicker) {
|
||||||
|
this.focused.setHours(this.timepicker.hours);
|
||||||
|
this.focused.setMinutes(this.timepicker.minutes);
|
||||||
|
}
|
||||||
this.selectDate(this.focused);
|
this.selectDate(this.focused);
|
||||||
} else if (alreadySelected && this.opts.toggleSelected){
|
} else if (alreadySelected && this.opts.toggleSelected){
|
||||||
this.removeDate(this.focused);
|
this.removeDate(this.focused);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user