javascript - Jquery Cannot get datepicker value -
on code: <input type="text" id="datefrom1" name="datefrom1" class="form-control datepicker"/> <i class="ace-icon1 fa fa-calendar"/> <script type="text/javascript"> $('.datepicker').datepicker(); </script> when submit form, params.datefrom1 hold value of datepicker. however, when used way, cannot value of datepicker <input type="text" id="datefrom1" name="datefrom1" class="form-control datepicker" disabled/> <i class="ace-icon1 fa fa-calendar" onclick="showpicker('#datefrom1')"/> <script type="text/javascript"> $('.datepicker').datepicker(); function showpicker(ele) { $(ele).datepicker('show'); } </script> the fact input box shows value after picked date, , when alert($('#datefrom1')) alerted value of date when