fix(datepicker): increase datepicker z-index in modals
This commit is contained in:
parent
33338cdfe9
commit
593a6a72d2
@ -139,6 +139,11 @@ export class Datepicker {
|
|||||||
// initialize tail.datetime (datepicker) instance
|
// initialize tail.datetime (datepicker) instance
|
||||||
this.datepickerInstance = datetime(this._element, { ...datepickerGlobalConfig, ...datepickerConfig });
|
this.datepickerInstance = datetime(this._element, { ...datepickerGlobalConfig, ...datepickerConfig });
|
||||||
|
|
||||||
|
// if the input element is in any open modal, increase the z-index of the datepicker
|
||||||
|
if (this._element.closest('.modal--open')) {
|
||||||
|
this.datepickerInstance.dt.style.zIndex = 9999;
|
||||||
|
}
|
||||||
|
|
||||||
// register this datepicker instance with the formID of the given element in the datepicker collection
|
// register this datepicker instance with the formID of the given element in the datepicker collection
|
||||||
const formID = this._element.form.id;
|
const formID = this._element.form.id;
|
||||||
const elemID = this._element.id;
|
const elemID = this._element.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user