JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/sweetalert2/latest/sweetalert2.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/sweetalert2/latest/sweetalert2.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/bootstrap.datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap.datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css">
<button id="button">SHOW SWAL2 MODAL</button>
CSS
#button {
font-size: 2em;
padding: .5em 1em;
}
#datepicker {
display: inline-block;
}
JavaScript
$('#button').click(() => {
swal({
title: 'Date picker',
html: '<input id="datepicker">',
showConfirmButton: false,
onOpen: function() {
$('#datepicker').datetimepicker({});
},
}).then(function(result) {
swal({
type: 'success',
html: 'You entered: <strong>' + result + '</strong>'
});
});
});