Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: format dates to WordPress `date_format` #3502

Closed
jr70 opened this issue Jul 18, 2018 · 6 comments

Comments

Projects
None yet
9 participants
@jr70
Copy link

commented Jul 18, 2018

User Story

As a Give Admin, I want the start/end date filter format in the Donations admin page to match my locale so that I have a consistent user experience.

My website has UK English (en_GB) as the site language so I expect all dates to be formatted as dd/mm/yyyy.

Current Behavior

Currently the date filter boxes have a placeholder of mm/dd/yyyy and when a date is selected from the dropdown calendar it is returned in the same US date format.

Expected Behavior

I expect to see dd/mm/yyyy as the placeholder and have the date returned from the calendar dropdown formatted to dd/mm/yyyy.

Acceptance Criteria

  • The date picker supports all date format (US or non-US) based on WordPress date settings.
  • Supporting WP date format does not affect other functionality like donation exports.

Related

https://secure.helpscout.net/conversation/671557137/26233
https://secure.helpscout.net/conversation/658188284/25003?folderId=672197

@kevinwhoffman kevinwhoffman changed the title Incorrect date format in Donations admin page fix(i18n): format dates to match site locale Jul 18, 2018

@kevinwhoffman

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

@jr70 Thank you for the detailed issue. I've assigned @Sidsector9 to confirm the issue and work on a fix in an upcoming maintenance release of Give 2.2.1.

@kevinwhoffman kevinwhoffman changed the title fix(i18n): format dates to match site locale fix(i18n): format dates to WordPress `date_format` Jul 19, 2018

ravinderk added a commit that referenced this issue Jul 20, 2018

Merge pull request #3508 from WordImpress/issue/3502
fix(i18n): format dates to WordPress `date_format` #3502
@raftaar1191

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

Finding

We need to fix the date format at other places to

image

image

@ravinderk should I create a new issue for this or else will fix this in the current issue as well

@raftaar1191 raftaar1191 reopened this Jul 22, 2018

@raftaar1191

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

Closing this issue as after running npm run dev this issue was solved

@mathetos

This comment has been minimized.

Copy link
Member

commented Sep 26, 2018

Reopening as we have a new customer reporting this same problem. To clarify, the original report was NOT about the Export functionality, but the Donations screen. This screen:
image

Steps to Replicate:

  1. Go to "Settings > General"
  2. For the "Date Format" setting, use j F, Y or some other non-U.S. date format
  3. Navigate to "Donations > Donations" and attempt to use the Date Filter at the top of the donations table. It will not fill the fields correctly.

Customer reported here:
https://secure.helpscout.net/conversation/658188284/25003/
https://secure.helpscout.net/conversation/674590613/26494?folderId=672194

@kevinwhoffman

This comment has been minimized.

Copy link
Member

commented Sep 27, 2018

@Sidsector9 I recently fixed a similar issue in WPBR impress-org/wp-business-reviews#259

I think it has to do with certain PHP date formats not being compatible with JS date formats.

@marutim

This comment has been minimized.

Copy link

commented Sep 27, 2018

Along with that, if the date format is set to dd/mm/yyyy, the export donations do not work at all. It alerts the admin with the following error
image

The fix should make sure that export functionality should work with all date formats.

More details about this issue in HS link: https://secure.helpscout.net/conversation/671557137/26233

@kevinwhoffman kevinwhoffman changed the title fix(i18n): format dates to WordPress `date_format` fix: format dates to WordPress `date_format` Oct 2, 2018

ravinderk added a commit that referenced this issue Oct 9, 2018

Merge pull request #3734 from impress-org/issue/3502
fix: format dates to WordPress `date_format` #3502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.