fix(datepicker): insert datepicker after the form
This commit is contained in:
parent
3f9454a7ef
commit
b590995093
@ -140,8 +140,8 @@ 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 });
|
||||||
|
|
||||||
// append the datepicker element (dt) to the form
|
// insert the datepicker element (dt) after the form
|
||||||
this._element.form.appendChild(this.datepickerInstance.dt);
|
this._element.form.parentNode.insertBefore(this.datepickerInstance.dt, this._element.form.nextSibling);
|
||||||
|
|
||||||
// if the input element is in any open modal, increase the z-index of the datepicker and set its position to fixed to avoid repositioning on page scroll
|
// if the input element is in any open modal, increase the z-index of the datepicker and set its position to fixed to avoid repositioning on page scroll
|
||||||
// FIXME: instead of setting the position to fixed, use absolute and reposition (decrease left)
|
// FIXME: instead of setting the position to fixed, use absolute and reposition (decrease left)
|
||||||
|
|||||||
Reference in New Issue
Block a user