Fixed #4947 - Calendar PT: mask defect
parent
573e4a0091
commit
dba0050194
|
@ -326,6 +326,10 @@ export interface CalendarPassThroughOptions {
|
||||||
* Used to pass attributes to the aria year's DOM element.
|
* Used to pass attributes to the aria year's DOM element.
|
||||||
*/
|
*/
|
||||||
hiddenYear?: CalendarPassThroughOptionType;
|
hiddenYear?: CalendarPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Used to pass attributes to the datepicker mask's DOM element.
|
||||||
|
*/
|
||||||
|
datepickerMask?: CalendarPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks.
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
|
|
|
@ -1683,10 +1683,14 @@ export default {
|
||||||
},
|
},
|
||||||
enableModality() {
|
enableModality() {
|
||||||
if (!this.mask) {
|
if (!this.mask) {
|
||||||
this.mask = document.createElement('div');
|
let styleClass = 'p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay p-component-overlay-enter';
|
||||||
|
|
||||||
|
this.mask = DomHandler.createElement('div', {
|
||||||
|
'data-pc-section': 'datepickermask',
|
||||||
|
class: !this.isUnstyled && styleClass,
|
||||||
|
'p-bind': this.ptm('datepickermask')
|
||||||
|
});
|
||||||
this.mask.style.zIndex = String(parseInt(this.overlay.style.zIndex, 10) - 1);
|
this.mask.style.zIndex = String(parseInt(this.overlay.style.zIndex, 10) - 1);
|
||||||
this.mask.setAttribute('data-pc-section', 'datepicker-mask');
|
|
||||||
!this.isUnstyled && DomHandler.addMultipleClasses(this.mask, 'p-datepicker-mask p-datepicker-mask-scrollblocker p-component-overlay p-component-overlay-enter');
|
|
||||||
|
|
||||||
this.maskClickListener = () => {
|
this.maskClickListener = () => {
|
||||||
this.overlayVisible = false;
|
this.overlayVisible = false;
|
||||||
|
@ -1722,7 +1726,7 @@ export default {
|
||||||
for (let i = 0; i < bodyChildren.length; i++) {
|
for (let i = 0; i < bodyChildren.length; i++) {
|
||||||
let bodyChild = bodyChildren[i];
|
let bodyChild = bodyChildren[i];
|
||||||
|
|
||||||
if (DomHandler.isAttributeEquals(bodyChild, 'data-pc-section', 'datepicker-mask')) {
|
if (DomHandler.isAttributeEquals(bodyChild, 'data-pc-section', 'datepickermask')) {
|
||||||
hasBlockerMasks = true;
|
hasBlockerMasks = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue