When using my country's standard format yyyy-mm-dd the date picker displaying wrong format. Instead of yyyy-mm-dd
it displaying yyyyyyyy-mm-dd

Comments

chrotto created an issue. See original summary.

chrotto’s picture

Issue summary: View changes
mikeker’s picture

Status: Active » Postponed (maintainer needs more info)

@chrotto, can you give me some more information about your setup? When I try to reproduce this, to looks to be working correctly (though my country settings are MM/DD/YYYY). Where are you setting date picker format?

Thanks.

chrotto’s picture

What I can see the Better Exposed Filter is using Default short date. So if you set format for Default short date to Y-m-d H:m you can see the wrong behaviour.
Noticed that I have to not only clear the cach, but also have a fresh browser with no history to accomplish this.

chrotto’s picture

I think I give up on this. To be able to give you an answer to mikeker, I struggled with the formats, and finally I managed to change the format in the Date picker.
Now I thought I should test to temporary have a wrong format on date but get the Date picker to work.
I have changed all settings in Date and time formats that is changeable to m/d/Y. I have changed the formats in Views, I have changed the default language to English, I have set the user to English, I have uninstalled and reinstalled the module but I can not change the unusable format to another in the Date picker. It still are setting date to 20172017-01-27.
I have also noticed an error message that appears when setting up the exposed filter for the date field. The error appears also without the Better exposed filter.
Notice: Undefined index: type in Drupal\views\Plugin\views\filter\Date->acceptExposedInput() (line 125 of core/modules/views/src/Plugin/views/filter/Date.php).
Can it be some kind of underlying error that causes this?
Pleas come up with a solution before I trough something out of the window.

chrotto’s picture

Sorry to ask, but I really need this module working on a Swedish site.
Is any work being done to make this work on other countries date formats?
I get disappointed when a new version is released and the format issue still is there.

chrotto’s picture

Still not anyone working with this issue?
I am in desperate need of date picker in my exposed filters.

chrotto’s picture

Have just updated to latest version of Drupal (8.4.0).
I noticed that the trouble with Datepicker in Better exposed filter still exist. What I can see Datepicker works fine in other cases.
Is this really not a BEF problem?

chrotto’s picture

I now noticed that I could solve the problem by changing the translation of mm/dd/yy to yy-mm-dd instead of yyyy-mm-dd.
A strange correction! With yyyy-mm-dd it resulting in 20172017-mm-dd, with yy-mm-dd it set the correct format 2017-mm-dd.

SaraKlasson’s picture

Hi! I got the same problem and I could solve it with solution #9. I have proposed the translation change chrotto made to the the Swedish translation as other languages seem to have a similar translation.
https://www.drupal.org/project/sv/issues/3061795

colorfulCoder’s picture

amykhailova’s picture

It looks like a duplicate of the one pointed in #11. If so translating English default date format to the one used in your country and language should solve the problem.

Neslee Canil Pinto’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

We are trying to deprecate 8.x-3.x, can you please check whether this still exists in 8.x-4.x/8.x-5.x branch.