0

This is not duplicate of "datepicker" question. Because see my jsp code below, which does not use type "datepicker", this is totally different question.

I have a jsp code as follows

<div class="form-group">
     <div class='input-group date' id='someId' style="width: 106%;">
         <input type='text' class="form-control" id="selectDateM" oninput="javascript:dummy()"/>
         <span class="input-group-addon">
             <span  class="glyphicon glyphicon-calendar" id="selDateBatch"></span>
         </span>
     </div>
</div>

In the above code, when i select a date, i want to get the value of the date in either javascript or jQuery.

What happens in my code is, when i click the calendar icon, it calls the proper javascript function, but it fails to load the value of the corresponding.

1

1 Answer 1

0

This is how i solved the issue

$("#someId").on("dp.change",function (e) {
        console.log('hi->'+$("#selectDateM").val());
     });

Not the answer you're looking for? Browse other questions tagged or ask your own question.