-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CustomerFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentRelease Line: 2.1Reproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releasebug report
Description
Environment
- Apache 2.4.17
- MySQL 5.0.11-dev
- PHP 5.6.15
- Magento 2.1.0
Steps to reproduce
- In System > All Users > User > [You], set the interface locale to English (United Kingdom):

- Create a new customer. Make sure to fill in Date of Birth field:

- Save Customer
Expected result
- Customer saves without error
Actual result
- "Invalid date" exception thrown:

- Trying to save the new customer again results in a JS validation error:

Cause
- The culprit is Date::inputFilter()
- In my case, Date::inputFilter() accepts
08/24/2016and returns0,8/2,4/2,016 0,8/2,4/2,016is not a real date in any locale, causing an exception to be thrown.
General locale issues in Magento 2.1
- Changing admin locale from en_US to en_GB causes PHP date formats to change, but not JS date formats.
- In the above example, the JS datepicker populated the field with
08/24/2016, despite the entire UI being in en_GB.
Metadata
Metadata
Assignees
Labels
Component: CustomerFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentRelease Line: 2.1Reproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.1 releasebug report