Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
chrotto CreditAttribution: chrotto commentedComment #3
mikeker CreditAttribution: mikeker as a volunteer commented@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.
Comment #4
chrotto CreditAttribution: chrotto commentedWhat 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.
Comment #5
chrotto CreditAttribution: chrotto commentedI 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.
Comment #6
chrotto CreditAttribution: chrotto commentedSorry 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.
Comment #7
chrotto CreditAttribution: chrotto commentedStill not anyone working with this issue?
I am in desperate need of date picker in my exposed filters.
Comment #8
chrotto CreditAttribution: chrotto commentedHave 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?
Comment #9
chrotto CreditAttribution: chrotto commentedI 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.
Comment #10
SaraKlasson CreditAttribution: SaraKlasson commentedHi! 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
Comment #11
colorfulCoder CreditAttribution: colorfulCoder commentedIs this a duplicate of https://www.drupal.org/project/better_exposed_filters/issues/2858293 ?
Comment #12
amykhailova CreditAttribution: amykhailova commentedIt 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.
Comment #13
Neslee Canil PintoWe 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.