Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

JS DateTimePicker onChange event not working

$
0
0

JS datetimepicker onChange event not working at all.

I've tried OnSelect, OnClose, OnChange, OnHide, OnChangeMonth to trigger datetimepicker event, but none of them works.

<input type="text" class="form-control datetimepicker-input" id="Datetimepicker" data-toggle="datetimepicker" data-target="#Datetimepicker" autocomplete="off" style="width: 200px;" />

$("#Datetimepicker").datetimepicker({
    format: 'MMM,YYYY',
    defaultDate: today,
    onSelect: function () {
        alert("It works!");
    }
})

$("#Datetimepicker").datetimepicker("change",function(){
    alert("It works!")});


$("#Datetimepicker").datetimepicker("changeDate",function(){
    alert("It works!")});

I've tried many ways, but still none of them working. Do I need to provide some other js library in order to make it work? Appreciate your help.


Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>