Liga
Liga

Reputation: 3439

Materialize CSS modal getting cropped inside another modal

I have a modal (datepicker) inside another modal but it is getting cropped because the parent modal is not big enough to display the second modal. Is there a way to make it pop out of the parent modal and be relative to the window and not the parent modal?

By inspecting the datepicker modal I can see that it is bigger than it appears. How is it possible if it's position is set to "fixed"?

<div id="first-modal" class="modal">
 <div id="second-modal" class="modal">

 </div>
</div>

Screenshot: enter image description here

Upvotes: 1

Views: 555

Answers (1)

CodeRed
CodeRed

Reputation: 903

Try:

$('.datepicker').pickadate({
    container: 'body' //this will append to body
});

Upvotes: 4

Related Questions