Magento2: Magento 2.1 There is not a standard for displaying dates and inputs does not respect the local format

Created on 21 Jul 2016  路  11Comments  路  Source: magento/magento2

The correct locale date format is dd/mm/yyyy

Magento
image

in Magento standard modules, the date is not always displayed in the same way. E.g. in the order grid, the purchase date is mmm dd, yyyy. ,..
image

but if I edit the same order that date is in dd/mmm/yyyy format.
image

For products, 'Set Product as New From' and 'to' dates are in the format mm/dd/yyyy and the calendar picker provide the date in this format.
image
For catalog price rules, in the grid, the date fields displays dd/mmm/yyyy
image

but in edit, dates are in mm/dd/yyyy and the calendar picker provide this format
image

For query filters such as orders reporting, the picker provide the date in the dd/mm/yyyy but those fields doesn't need to be saved.
image

So it appears that there is not a standard, or that a standard is not respected in Maento standard modules, to display dates but there is a standard for date input: mm/dd/yyyy that not consider locales.

Ale

Confirmed P4 ready for dev Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x S4 bug report

Most helpful comment

Any progress on this issue....
It's very urgent considering this ticket was opened in 2016.
Cart rules, catalog rules, cms rules do not work properly when conditions use dates.

All 11 comments

Hello @PierAlex ! I cannot reproduce your issue. I have same format of all my date control which you mentioned on the Front-end and Beck-end. Please, provide more details.

Hello @oserediuk,
Can you please help me to understand which details can I provide you more? Is there any place where I can look for configuration settings?
Ale

@PierAlex , I observed all control which you mentioned here and didn't see difference of format date on the fresh installation Magento 2.1.0 I cannot reproduce you issue. If you could add some more information, it would be useful to reproduce this case. It could be some non-default setting or special commit code base.

@oserediuk
It also happens on a fresh installation. I'm expecting to manage dates in my locale format (dd/mm/yyyy).

image

To set date input format in my locale format, I set Timezone in stores->configuration->General Tab. Is this the right place? It does not take effects for date fields. Inputs must be entered as mm/dd/yyyy.

As additional info,
Stores->Configuration->General->Country settings-> Default country = Italy.

Magento2 runs on plesk 12.5 ubuntu 14 php 7.08.
Ubuntu date format is "Fri Jul 29 06:36:14 CEST 2016"

Hi @PierAlex

Thanks for helping us. I've managed to reproduce this issue so I created internal ticket for it #MAGETWO-58253. This ticket will be closed after fix.

Thanks again!

Also looking for the date fix, is it coming soon?

@PierAlex, thank you for your report.
We've created internal ticket(s) MAGETWO-58253 to track progress on the issue.

Many filters still not working by locale, Like order filters date, invoice filters date, customers filters date and many other filters by date.

Any progress on this issue....
It's very urgent considering this ticket was opened in 2016.
Cart rules, catalog rules, cms rules do not work properly when conditions use dates.

@magento-engcom-team could you post an update on this issue please
As of 2.2.9 default if I set my locale in my admin account, to dd/mm/YYYY and using the date picker in the grid filters, filter by a date, the date that the picker populates in the input is right, but the filter on the collection is wrong. Filters by mm/dd/YYYY instead of dd/mm/YYYY

This is also affecting magento 2.3.2, would be nice to get an update, as filtering large order sets is required for providing swift customer support and reporting.

Was this page helpful?
0 / 5 - 0 ratings