my code worked...but its giving error in controller
QueryException in Connection.php line 761:
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '' for column 'fallow_up_date' at row 1 (SQL: insert into enquiry (customer_id, customertype, enquiry_for, language, enquired_through, result, fallow_up_date, quantity, comments) values (18, 2, 1, 4, 7, 2, , 10, ))
my code
<div class="form-group">
<label for="sel5">Enquiry Result</label>
<select name="result" class="form-control" id="sel5" onchange="showresult(this.value)">
<option value="" disabled selected>--Select--</option>
<option value="1">Follow Up Required</option>
<option value="2">Active Order</option>
<option value="3">Suspened</option>
<option value="4">Error</option>
<option value="5">Cancelled</option>
</select>
</div>
<div class="form-group">
<label>Fallow Up</label>
<input name="fallow_up_date" class="form-control" id="fallowupdate" placeholder="MM/DD/YYYY" type="date"/>
</div>
<script>
function showresult(str) {
if (str == "1") {
$("#fallowupdate").css('display', 'block');
return;
}else{
$("#fallowupdate").css('display', 'none');
}
}
</script>