I wanted to assign daterangepicker value to a text box in order to store the new selected date to a database. Though i tried this but didn't work as i expected.
HTML
<input type="text" id="" name="docrcvd" value="<?php echo $res->doc_date; ?>" class="form-control col-md-12" disabled="disabled">
<input type="text" id="birthday1" class="fa fa-calendar date-picker ">
This works fine and it populate the date stored in database and the second input filed display the datepicker.
But the problem is once i selected new date it won't assign the newly selected date to the first input field.
Jquery
$(document).ready(function() {
$('#birthday1').daterangepicker({
onSelect: function(dateText, inst) {
$('#docrcvd').val(dateText);
}
});
});
Any help or suggestion would appreciated. Thank you!