Home » Jquery » javascript – How to display an alert on month select?

javascript – How to display an alert on month select?

Posted by: admin February 22, 2020 Leave a comment

Questions:

I have this input :

input type="text" class="form-control selectiondate" id="datepicker-month" />

And I would like when I click on a month :

selectedmonth

I get an alert with ‘ok’

I tried this :

$(document).on('click', '#datepicker-month', function () {
    alert('ok');   
});
How to&Answer: