我在我的表单中使用输入类型=“日期”,它显示mm / dd / yyyy而不是像10/01/1992这样的日期。

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:

  1. that $row['DOB'] actually has the date value (as Qirel already suggested)
  2. that $row['DOB'] value is in the format: 2017-02-27 (NOT: 02/27/2017)

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>