Hello,

My site is in French and I'm facing problem with the Date Authored Popup module, both for the date picker and the time field.

The content type Date Authored Popup settings is set to custom format: l j F Y, G:i
which for today outputs Mardi 11 Mars 2014, 18:15 (Mardi means tuesday, Mars means March and time in on 24h format).

Problem with the date:
If I play with the publication date popup, change date and go back to today, the date field now says: Mardi 11 mars 2014 (notice the lowercase on the month).
If then I save the content, I get an error telling me that the month is not valid: I have to manually edit it to capitalize the first letter of the month, so now the field is Mardi 11 Mars 2014 which is accepted (I haven't touched the time yet which is still 18:15).

Problem with the time:
If I click on the time field, text is changed to 06:15PM which is also considered as invalid.
And there, editing the field is lock to that format: I can't revert to 18:15 and I can only use up and down arrows to set time.

Any clues?

CommentFileSizeAuthor
#1 date_popup_fr.png20.85 KBMark Trapp
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mark Trapp’s picture

Title: Date & Time custom formats: problem with localization? » Date Popup does not fully support localized dates or times
Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)
FileSize
20.85 KB

With respect to the time issue, this is a problem upstream with the Date Popup module that Date Popup Authored relies on. In Date Popup, 24 hour support is hardcoded to only enable when the H date flag is enabled, not G. From date_popup_process_time_part():

$settings = array(
  'show24Hours' => strpos($element['#date_format'], 'H') !== FALSE ? TRUE : FALSE,
  // ...
);

So the two options would be either to use H instead of G or to file a bug report/write a patch to fix the check upstream in Date Popup. If the latter is done, Date Popup Authored should pick up the change automatically. If it doesn't, feel free to file a new bug report here.

With respect to the capitalization issue, from my testing I can't even get the Date Popup timepicker to recognize any language other than English. I've installed the fr.po files for Drupal core and Date, yet Date Popup fills the fields in with the English names:

Can you provide a step-by-step guide for reproducing the state you see for someone who has a minimal understanding of Drupal localization (i.e., me)? Without being able to reproduce the issue locally, I can only guess at the cause for the capitalization problems (but I suspect it's another upstream issue, given Date Popup Authored does not modify the JavaScript behavior of Date Popup and uses Date Popup's validation system).

Mark Trapp’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No movement on this in a couple of weeks, so I'm going to close the capitalization issue out: please feel free to reopen with more information on how to reproduce the problem. The time issue is won't fix due to it being an upstream issue with Date.