1

I wrote this code to have an input form to get a date value:

<input type="date" name="BIRTHDAY" required="">

The form works fine but I would like to force it (and the little calendar that opens) to be always in english. I'm working in Italy, so the input default shown is "gg/mm/aaaa" rather than "dd/mm/yyyy" and also the calendar shows the name of the months in Italian.

Is there some way to force it to be always in english, regardless the location of the user?

Thanks!

baband
  • 123
  • 12
  • 2
    _The displayed date format will differ from the actual value — the displayed date is formatted based on the locale of the user's browser, but the parsed value is always formatted yyyy-mm-dd._ from [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date) – Sfili_81 Aug 05 '20 at 13:19
  • [Is there any way to change input type=“date” format?](https://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format) – Nathan Champion Aug 05 '20 at 13:19

1 Answers1

-1

It looks like this may be what you are looking for.

Try adding a default language in the html tag

<html lang="en">

also try this

<html translate="no">

https://stackoverflow.com/a/12238414/10958914

https://www.w3.org/International/tutorials/language-decl/#:~:text=Always%20add%20a%20lang%20attribute,default%20language%20of%20your%20page.&text=If%20this%20is%20XHTML%201,use%20the%20xml%3Alang%20attribute.

Captain
  • 420
  • 5
  • 14