I'm trying to use Sweet Alert 2 .
I would like to increase the textarea field by using the rows attribute, but it is not working.
How do I increase the size of the field?
$('.btn').on('click', function(){
telaModal()
});
function telaModal(){
swal({
title: 'Dados do acidente',
html:
'<input id="swal-input1" class="swal2-input" placeholder="Data do Acidente">' +
'<textarea id="swal-input2" class="swal2-input" rows="100"></textarea>',
focusConfirm: false,
customClass: 'sweetalert-lg',
onOpen: function() {
$('#swal-input1').datetimepicker({
"format": 'd/m/Y',
"mask":true,
"value": new Date()
});
},
width: '400px',
heightAuto: false,
preConfirm: () => {
return [
document.getElementById('swal-input1').value,
document.getElementById('swal-input2').value
]
}
})
}
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/7.25.0/sweetalert2.all.min.js"></script><buttonclass='btn'>Clique</button>
Iwouldlikeittolooksomethinglikethis: