Hola, tengo una ventana emergente sweetalert2 que, cuando se hace clic, llama a un método api. Lo que estoy tratando de lograr es tener un campo de entrada de selector de fecha que sea obligatorio si hacen clic en el botón Sí. También necesito pasar la fecha que eligen a mi método api. Aquí está mi código
const swalWithBootstrapButtons = Swal.mixin({ customClass: { confirmButton: 'btn btn-success', cancelButton: 'btn btn-danger' }, buttonsStyling: false }) swalWithBootstrapButtons.fire({ title: 'Do you want to activate user <font color="red">' + user[1] + ' ' + user[2] + '</font>', text: "Email: " + user[3], icon: 'question', showCancelButton: true, confirmButtonText: 'Yes', cancelButtonText: 'No', reverseButtons: true }).then((result) => { if (result.isConfirmed) { $.ajax({ url: "../api/myController/controllerMethod", type: "get", //send it through get method data: { Id: user[0], ModifiedBy: user[1]' }, success: function (response) { swalWithBootstrapButtons.fire( 'Activated!', 'The user is activated.', 'success' ) var table = $('#dtMembers').DataTable(); table.ajax.reload(); }, error: function (xhr) { //Do Something to handle error } }); } else if ( /* Read more about handling dismissals below */ result.dismiss === Swal.DismissReason.cancel ) { //swalWithBootstrapButtons.fire( // 'Cancelled', // 'Your imaginary file is safe :)', // 'error' //) } }) Estoy tratando de hacer que se vea algo como esto 
Gracias