SweetAlert2: Unknown parameter "type" warning message
Other 2021-10-28
I solved it, The problem was because I used
swal({ ..... })
instead of swal.fire({ ..... })
Before
[removed]
$("#confirm").click(function(){
Swal.fire({
title: 'Are you sure?',
text: "To payment Register this bill !",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, Payment Register'
}).then((result) => {
if (result.value) {
Swal.fire(
'success!',
'Payment Register',
'success'
)
}
})
});
[removed]
After Add Type And Icon
[removed]
$("#confirm").click(function(){
Swal.fire({
title: 'Are you sure?',
text: "To payment Register this bill !",
type: 'warning',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, Payment Register'
}).then((result) => {
if (result.value) {
Swal.fire(
'success!',
'Payment Register',
'success'
)
}
})
});
[removed]