jquery - Using Bootstrap DatetimePicker with Sweet Alert 2 - Display calendar over alert -




i using sweetalert2 dialog form inside. want use bootstrap datetimepicker widget.

the calendar widget popup displayed within sweetalert window instead of on top of it. makes alert expand , contract - , must scroll inside alert see calendar. desired behavior calendar display child of primary page , display on top of alert.

https://jsfiddle.net/ghr2bwoc/13/

  swal({     title: 'date picker',     html: '<input id="datepicker">',     showconfirmbutton: false,     onopen: function() {         $('#datepicker').datetimepicker({});     },    }).then(function(result) {    }); 

create additional class in style sheet:

.swal2-overflow {   overflow-x: visible;   overflow-y: visible; } 

add new class sweet alert code using customclass attribute.

swal({   title: 'date picker',   html: '<input id="datepicker">',   showconfirmbutton: false,   customclass: 'swal2-overflow',   onopen: function() {       $('#datepicker').datetimepicker({});   },  }).then(function(result) {  }); 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -