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.
|
||||
*/
|
||||
hiddenYear?: CalendarPassThroughOptionType;
|
||||
/**
|
||||
* Used to pass attributes to the datepicker mask's DOM element.
|
||||
*/
|
||||
datepickerMask?: CalendarPassThroughOptionType;
|
||||
/**
|
||||
* Used to manage all lifecycle hooks.
|
||||
* @see {@link BaseComponent.ComponentHooks}
|
||||
|
|
|
@ -1683,10 +1683,14 @@ export default {
|
|||
},
|
||||
enableModality() {
|
||||
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.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.overlayVisible = false;
|
||||
|
@ -1722,7 +1726,7 @@ export default {
|
|||
for (let i = 0; i < bodyChildren.length; i++) {
|
||||
let bodyChild = bodyChildren[i];
|
||||
|
||||
if (DomHandler.isAttributeEquals(bodyChild, 'data-pc-section', 'datepicker-mask')) {
|
||||
if (DomHandler.isAttributeEquals(bodyChild, 'data-pc-section', 'datepickermask')) {
|
||||
hasBlockerMasks = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue