Bug #23065 See Comments

Datepicker errors for European format in grid field

Version: 3.5.6 Reporter: Peter Stalker

When entering a date into a Grid field using the datepicker, for the first one or two entries this works fine. The date appears in the desired (and logical) European default format, dd/mm/yyyy.

But for subsequent entries, typically the third or fourth, the datepicker only offers a blank month. The workaround is to drag the slider under the blank month fully to the right then fully back to the left. This makes the month’s dates reappear. This will work for one or two entries, then the datepicker goes blank again.

A second issue occurs with manual entries. Faced with a blank datepicker, clients have typed the date into the grid field. Such an entry looks OK, in the dd/mm/yyyy format, but deceptively what has actually been accepted into the database is in the mm/dd/yyyy format. This is evident if you subsequently click into the manually entered date while the datepicker is visible. It displays the wrong date, having interpreted it in the US format.

  • Could you provide steps to reproduce your first issue? I’m unable to reproduce, and I’m not too sure what you mean by “entries.” Do you mean rows? The date picker is working fine for me in Grid across multiple rows. What browser do you see this behavior in?

    As for your second issue, yes if you don’t type a date that matches your chosen date format exactly, including the time, then we are not sure what format it’s in so we have to let PHP figure it out, and I guess it falls back to the US format.

    Kevin Cupp
    01st May, 2017 at 2:54pm
  • From email:

    Dear Kevin, Thanks for your response. Apologies, I did mean adding a row. I have attached two screen shots. For the first issue, I have successfully added one row for John Doe, but when I tried to add a further row I got the effect shown. For the second issue, I have tried typing the date directly, including the time, in the correct format, and now get “undefined NaN” as shown. This is using Firefox, but I have had users of Explorer reporting the same problem. Best wishes, Peter

    Thanks, Peter. For the first issue, it sounds like you’ve largely repeated what you had in the original report. Could you provide step-by-step instructions to reproduce on a clean install, as if you’re telling someone on a clean install how to make this error happen? I’m still unable to make it happen given these instructions. I have my date format set to dd/mm/yyyy but the date picker works fine for new Grid rows, so there must be something else at play. It may be helpful or quicker to submit a support ticket with your login credentials.

    For the second issue, that’s to be expected at the moment unfortunately, JavaScript will not parse a date in that format, but the PHP should handle it fine if you wanted to save the entry that way.

    Kevin Cupp
    01st May, 2017 at 5:07pm
  • Thanks Kevin, yes, there must be something else. I am not sure, however, what you mean by a clean install. Does that imply another copy of EE, and a new website? I would rather not…

    For information, though, exactly the same thing is happening on another of my sites.

    I would be happy to give my logon details, but doing so via a support ticket implies this is my error rather than a bug (usually a safe bet, but not certain). It also means I have to cough up $49 for a support plan. That’s a lot of post-Brexit pounds. If it’s a bug do I get my money back?

    On the second issue, this does not matter. I can warn users not to type in a date, and the other workaround is in any case easier.

    Peter

    Peter Stalker
    02nd May, 2017 at 11:36am
  • Yes a clean install means another copy of EE, it helps to isolate all other variables such as add-ons or other configuration settings. Otherwise, we can’t be sure this is a bug.

    No we’re unable to refund for support, I wasn’t sure if you already had a support subscription so that’s why I mentioned it. I’ll send this to one of our other team members who has been working with the European date format lately to see if she can reproduce it.

    On the second issue, they can still type in a date if they want, it should still save fine, just don’t expect the date picker to work.

    Kevin Cupp
    02nd May, 2017 at 11:45am
  • Thanks, I think we can live with the workaround – or the problem might just disappear as mysteriously as it arrived!

    Peter Stalker
    02nd May, 2017 at 11:56am
  • Hope so! I’ve just had Robin try to reproduce this and she didn’t have any luck either. Let us know if you happen to discover specifically what triggers this behavior and we’ll take another look.

    Kevin Cupp
    02nd May, 2017 at 11:57am

You must be signed in to comment on a bug report.

ExpressionEngine News

#eecms, #events, #releases