-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix/date picker localization #546
Conversation
722a601
to
d7f0959
Compare
Part of this PR also encompasses fixing up the PHPUnit testing to enforce better ordering (AJAX unit tests define |
365511b
to
9caa5d9
Compare
9caa5d9
to
fd693a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change and we're good to go.
To match runInSeparateProcess
@mjangda made one small change to resolve test failures on PHP 5.6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for fixing that test. I kept meaning to push up a fix but wasn't annoying enough until now since it only impacted PHP 5.6.
Description
Fixes #457. Instead of trying to parse the localized date (which fails when using
strtotime
orDateTime::createFromFormat
for certain cases), we're setting the DateTime numerically so we can parse it.Also, we're adding a z-index to the DatePicker, it was hidden when using the BlockEditor
Steps to Test
Settings
, set language toDansk
date
editorial metadata and select a date in MayPreviously, a date in the month of May would not save (because
strotime
andDateTime:createFromFormat
would fail to parse it) when the language wasDansk
. This was probably impacting other languages as well