is there anyway to initiate the calendar / time view from the html5 element type="datetime-local" ?
<input type="datetime-local" id="dtl" />
<script>
$('#dtl').click();
</script>
doesn't work, even though you can listen for events on click.
Unfortunately, not really.
The HTML5 calendar view is implemented differently by each browser, so there's no solid way of activating the browser's datetime calendar picker. The best you could do is probably $('#dtl').focus();
to focus in the field, but I know that's not what you want.
A cross-browser alternative is to use something like the jQuery UI datepicker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With