Magento2: DatePicker date format does not reflect user's locale

Created on 3 Oct 2016  路  10Comments  路  Source: magento/magento2

Preconditions

Magento 2.1.1

Steps to reproduce

Find any date field in Magento, e.g. customer edit form Date of Birth, and choose a date.

Expected result

The date is in the current user's locale's standard date format.

Actual result

The date is in the format mm/dd/yyyy.

Translation Fixed in 2.1.x Fixed in 2.2.x Fixed in 2.3.x Format is valid Ready for Work bug report

Most helpful comment

Hi,

Can anyone provide an update on this, i see it's been marked as a bug. Is this a known issue?

Regards,

Sophie

All 10 comments

I'm also experiencing this issue, the date format should be dd/mm/yyyy for UK stores. Even when i set the date format in Configuration > Catalog > Catalog > Date & Time Custom Options, and set the default country to UK, if i try and set the dob field against a customer to the 10th April i.e. 10/04/1991, the datepicker selects october as the month and the 4th as the day,

image

if i go ahead and save the date in the above format, the grid shows Apr 10, 1991 (which is correct), but then when i edit this customer again, the date is loaded in as 04/10/1991.

image

There is also an issue when importing customers with the uk date format,

i.e. customer with dob 12/02/1941 will be imported with a dob of Dec 2, 1941 which is wrong, the import process also assumes the US date format.

Hi,

Can anyone provide an update on this, i see it's been marked as a bug. Is this a known issue?

Regards,

Sophie

@sma09sjb,

I had a similar issue with Date fields in #6323.

@mmansoorebay pushed two commits (#1, #2) to rectify the issue. Do these fix your issue?

internal jira ticket has been created -MAGETWO-59937

I have a similar issue I described here #5943 , still waiting for resolution. The newsletter queue time does not reflect my local time. I tried the commits referenced, but it does not solve my issue.

@JacobDrummond we'd like to avoid modifying the core code files if possible. Any ideas when this fix will be part of an official release?

Internal ticket to track issue progress: MAGETWO-80096

Hi @qubaji the issue has been fixed in https://github.com/magento/magento2/pull/11067 by @joachimVT. The fix will be available in 2.2.1

Not fixed in 2.2.1. Very bad.

magento2-1-1

Hi @qubaji. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1353 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

  • 299109f1265fa15eeb3067e22c2638ff5907205e
  • 57318bf03bf6fe7f84b2956ffb5ecc1332bf41b3
  • 41cd961a217d30c4b7b051a775902c4fb40b84ea
  • 076b90398852478d93d1444f936ac483b4640a82
  • 435a6c200cd548b8765e5bc73b0458039a58645d
  • 5d174b873f8ba369d6504fb9d7ef30296816e2b1
  • a47b10dce854a2d21ead6b362b86ca3ddf595386
  • ab48cb176830ddab69fd1617cae96d76094ab167
  • 46be4c7ea59f6cfb9884f2bc5875245b1960edc6
  • eafc6f0a473547542c3ef80352dcd2be7128da87
  • 63b9e909f1173a51374d4cdfc68249baa66f0007
  • 2edfe9a30bb64f0a7e102bb335a89658b627bfad
  • ef5ddffb43a735627d09535b62fac2a41804a96a
  • 4ada797ece84c2f5eb55499e8bc3f75e0c7ef245
  • c5d9a019b0d51a51b452fd99b527e3b894874be2
  • 72e9e0732b98ea5b8f47bddc781dc47c688c3c58
  • 215180de0a3f6c4a16e02205732bfe8670293ad2
  • 685d50625b68dbb960988a6bfbbfc14455a6cb9e

The fix will be available with the upcoming 2.3.0 release.

Was this page helpful?
0 / 5 - 0 ratings