1

I have <%= f.date_field :day %>, which is asking users to input date in the American format: mm-dd-yyyy.

How can I change it to dd-mm-yyyy ?

While we're at it, how can I change the TIME_FIELD to ask for hours in the 24-hour system (say, instead of inputing 07:00PM, I could say 19:00)?

Thanks in advance

1 Answers1

0

The f.date_field helper will create a standard (native browser) HTML input of type='date'

So you are not able to format the date as such, as per this SO answer.

I recommend you use a jQuery plug in or date picker of some kind.

Community
  • 1
  • 1
rlarcombe
  • 2,958
  • 1
  • 17
  • 22