My code is as follows :
<form >
<input type="date" value="<?php $row['DOB']; ?>" name="dob">
</form>
the datatype of column DOB is date and when i want to view or edit the date is shows only dd-mm-yyyy instead of that date from database
You will need to make sure:
You can verify that the following code does NOT work (actually, this is browser-specific -- it does NOT work in Chrome, but it works in Firefox and maybe some other web browsers):
<form >
<input type="date" value="02/27/2017" name="dob">
</form>
But the code below works:
<form >
<input type="date" value="2017-02-27" name="dob">
</form>