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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -