javascript - Get the value of datepicker on change in jquery -
i need value of datepicker
on change
, returning undefined
.
html :
<input id="#return" name="start" class="date-pick form-control" value="" data-date-format="dd/mm/yyyy" type="text" />
js :
$('input.date-pick').datepicker().on('changedate', function (ev) { var firstdate = $('#return').val(); alert(firstdate); });
use onselect
event , can selected value in datetext
variable
$('.date-pick').datepicker({ onselect: function(datetext, inst) { alert(datetext); } });
Comments
Post a Comment