0

I use input type=date below to get datetime from screen in HTML. The input date format is mm/dd/yyyy but i wanna to change it to dd/mm/yyyy.

How can I do that?

<input type="date" value="' + today + '" 
       class="date" id="datePicker" style="width:30%" 
       min="25-10-1900" max="25-10-2100" />

PS: I also use that code below, but it doesn't work. (where should i call that function?)

jQuery(function ($) {
    $("#datePicker").mask("99/99/9999", { placeholder: "dd/MM/yyyy" });
});
Ahmad
  • 12,336
  • 6
  • 48
  • 88
Recep
  • 11
  • 5
  • Please see this http://stackoverflow.com/questions/6978631/how-to-set-date-format-in-html-date-input-tag – Ajith S Jul 02 '15 at 08:46
  • See this [http://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format](http://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format) – Daniel Petrovaliev Jul 02 '15 at 09:07
  • See [here](http://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format). There is no possible way of changing the format using HTML only. – Ben Thomas Jul 02 '15 at 09:08
  • A good number of browsers don't support input type date anyway. – RobG Jul 02 '15 at 09:10

0 Answers0