When I put the panel in Spanish the filters stop working:
Why can this be? And how can I fix it?
Thank you so much!!
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
The problem is only with the date filters, and this happens due to the format of the dates, because:
Spanish: June 1, 2020 -> 01/06/2020
English: June 1, 2020 -> 06/01/2020
And magento always filters with the English format, even if the panel is in Spanish. How can I change the format of the filter? or How can I change the format of the calendar to use ever english format?
To solve this problem go to:
And replace in function convertDate:
$dateObj = $this->localeDate->date( new \DateTime( $date, new \DateTimeZone($this->localeDate->getConfigTimezone()) ), $this->getLocale(), true );
$dateObj = $this->localeDate->date($date, $this->getLocale(), true);