It is necessary that the datetime-local element displays the current date and time of the default value type. How to implement it?

<input type=datetime-local name='deliverydate' value=''> 

1 answer 1

 <input type=datetime-local name='deliverydate' value=''> $(document).ready( function() { $('input[type=datetime-local]').val(new Date().toJSON().slice(0,19));});