mirror of
https://github.com/frappe/air-datepicker.git
synced 2026-01-14 02:49:13 +08:00
fix focus on current time in IE
This commit is contained in:
parent
bc6960aad4
commit
84bfbe9a45
4
dist/css/datepicker.css
vendored
4
dist/css/datepicker.css
vendored
@ -455,8 +455,8 @@
|
||||
bottom: -2px;
|
||||
z-index: -1;
|
||||
opacity: 0; }
|
||||
.datepicker--time-current-hours.active:after,
|
||||
.datepicker--time-current-minutes.active:after {
|
||||
.datepicker--time-current-hours.-focus-:after,
|
||||
.datepicker--time-current-minutes.-focus-:after {
|
||||
opacity: 1; }
|
||||
|
||||
.datepicker--time-current-ampm {
|
||||
|
||||
2
dist/css/datepicker.min.css
vendored
2
dist/css/datepicker.min.css
vendored
File diff suppressed because one or more lines are too long
8
dist/js/datepicker.js
vendored
8
dist/js/datepicker.js
vendored
@ -1867,7 +1867,7 @@ var Datepicker;
|
||||
this.d.$el.on('selectDate', this._onSelectDate.bind(this));
|
||||
this.$ranges.on(input, this._onChangeRange.bind(this));
|
||||
this.$ranges.on('mouseenter', this._onMouseEnterRange.bind(this));
|
||||
this.$ranges.on('mouseout', this._onMouseOutRange.bind(this));
|
||||
this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
|
||||
},
|
||||
|
||||
_setInitialTime: function (date, parse) {
|
||||
@ -2072,12 +2072,14 @@ var Datepicker;
|
||||
|
||||
_onMouseEnterRange: function (e) {
|
||||
var name = $(e.target).attr('name');
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).addClass('active');
|
||||
this.rangInFocus = name;
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
|
||||
},
|
||||
|
||||
_onMouseOutRange: function (e) {
|
||||
var name = $(e.target).attr('name');
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('active');
|
||||
if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
|
||||
}
|
||||
};
|
||||
})(window, jQuery, Datepicker);
|
||||
|
||||
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
@ -35,7 +35,7 @@
|
||||
this.d.$el.on('selectDate', this._onSelectDate.bind(this));
|
||||
this.$ranges.on(input, this._onChangeRange.bind(this));
|
||||
this.$ranges.on('mouseenter', this._onMouseEnterRange.bind(this));
|
||||
this.$ranges.on('mouseout', this._onMouseOutRange.bind(this));
|
||||
this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
|
||||
},
|
||||
|
||||
_setInitialTime: function (date, parse) {
|
||||
@ -240,12 +240,14 @@
|
||||
|
||||
_onMouseEnterRange: function (e) {
|
||||
var name = $(e.target).attr('name');
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).addClass('active');
|
||||
this.rangInFocus = name;
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
|
||||
},
|
||||
|
||||
_onMouseOutRange: function (e) {
|
||||
var name = $(e.target).attr('name');
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('active');
|
||||
if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider
|
||||
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
|
||||
}
|
||||
};
|
||||
})(window, jQuery, Datepicker);
|
||||
|
||||
@ -119,7 +119,7 @@ $rangeThumbBg: #dedede;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&.active {
|
||||
&.-focus- {
|
||||
&:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user