3

By default, when editing a date field that includes day, month, and year, there are dropdowns displayed in day-month-year order. This is good for English, but for users whose language is set to Japanese, I would like to show the edit dropdowns in year-month-day order. Is this possible?

I'm on Drupal 7.

EDIT: I attempted to edit the locale format but I wasn't able to get it working.

Under localize, I set the following values for Japanese: long-medium-short

I then confirmed that the field was set to display dates using the short format:

field-display

I then cleared my cache twice and reloaded. However, the edit widget (a date field on the user profile registration page) still displays dates in day/month/year format for both languages.

3

I came across the issue today. Found there is an option to change the date format for Date field.

FYI: It is under "More Settings". Cheers

enter image description here

2

Yes, Edit locale format in

admin/config/regional/date-time/locale

for different languages.

The widget is smart enough to adjust for you base on your time format settings.

Before:

enter image description here

Adjustment:

enter image description here

After:

enter image description here

  • I tried your instructions but I wasn't able to get it working... I may be missing a step. I've updated my question; please take a look at it again if you have time. – Patrick Kenny Jul 5 '12 at 6:27
  • arh, I just had another look. My original test was based on Webform's date field widget. It is smart enough to adjust accordingly. I thought Webform's date field used Date's module, but it does not. I was wrong enough to mislead you. I am sorry. My answer is incorrect. – gilzero Jul 5 '12 at 12:25
1

You also can easily change it if you don't depend on site-wide date settings. If so - just go and change "short" date format (just an order of days and months) at admin/config/regional/date-time. Webform (and other #type = 'date' fields) will use the same order for its date fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.