Ion-datetime-button inside Modal - Backdrop doesn't appear

Hi:

Trying to put ion-datetime-button inside a custom blank ionic Modal and the backdrop does not show/appear. The date-time box is shown striped.

I tried to play with the css, thought and it appears as z-index problem on the backdrop. But when I target the shadow dom parts then it doesn’t work but with the webtools of the browser it works.

This is the css I used:

:root {
ion-modal.ion-datetime-button-overlay::part(backdrop) {
background-color: red !important;
z-index: 11;
}
}

Now the css is given to the backdrop but it doesn’t work like you do it in the browser itself without the css.

How to fix it?

1 Like

I have this problem too :frowning:

At the global.css:

:root {
ion-modal.ion-datetime-button-overlay::part(backdrop) {
–backdrop-opacity: 0.1;
z-index: 11;
}
ion-modal.ion-datetime-button-overlay::part(content) {
z-index: 12;
}
}