- Merge request !12Issue #2858610: allow the date format to be set from the bef interface → (Closed) created by svendecabooter
- 🇯🇴Jordan Odai Atieh Amman
A warning appeared as below, so I've updated the latest patch to check if the filter is set or not before checking if datepicker is selected.
Warning: Undefined array key "filter" in Drupal\better_exposed_filters\Plugin\views\exposed_form\BetterExposedFilters->exposedFormAlter() (line 797 of modules/contrib/better_exposed_filters/src/Plugin/views/exposed_form/BetterExposedFilters.php).
- 🇯🇴Jordan Odai Atieh Amman
Please ignore better_exposed_filters_allow_the_date_format-2858610-23_2.patch
- 🇮🇹Italy Hotfingers
Hi, I tried #44, but it didn't work.
I had to use #37, but I also had to add a new date format, as @scuba_fly said in #40.
The new format must be set like "19-05-23" as "19/05/23" won't work.
Remember to clear cache.Drupal: 9.5.5
BEF: 5.2 - 🇬🇧United Kingdom Alina Basarabeanu
Using Drupal Version 9.5.8, better_exposed_filters version 6.0.3, jquery_ui_datepicker 1.4.0 and patch #44 the date filter is working only with the 'd-m-Y' date format.
- First commit to issue fork.
- Merge request !47Issue #2858610: allow the date format to be set from the bef interface → (Closed) created by dieterholvoet
- Status changed to Needs work
about 1 year ago 12:14pm 11 October 2023 - 🇧🇪Belgium dieterholvoet Brussels
I started a fresh MR, not based on the previous patches, because I don't really agree with the approach there. Some differences:
- A lot simpler, less code.
- No global module config is added. The date format is stored in the filter widget config instead.
- Every date format is now compatible. Before, only formats that were parseable by the
strtotime
function were supported.
Let's stop posting patches now in order to prevent duplicate work and potential confusion.
- Status changed to Needs review
about 1 year ago 12:45pm 11 October 2023 - Status changed to Needs work
about 1 year ago 10:39am 13 November 2023 - 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
I really like the latest MR, it is super clear. I made some small remarks in the MR.
- Status changed to Needs review
about 1 year ago 1:53pm 13 November 2023 - Status changed to RTBC
about 1 year ago 1:55pm 13 November 2023 - Status changed to Needs review
about 1 year ago 12:16am 27 November 2023 - 🇵🇹Portugal gueguerreiro Lisboa
Merge request 47 worked perfectly for me, except until I needed to use an in-between date filter, which instead provides multi-date fields (min and max).
The exposedFormAlter() Seems to have special cases for the min/max fields already, but the same does not seem to exist for the exposedFormSubmit() and getElement() functions.
I made some changes to make it work on a project of mine. I'm not sure how to fork from @DieterHolvoet's existing branch, so I'm attaching a patch with the changes (Relative to the MR 47). It can be seen as a diff.
If you could review it and include it on your MR it would be greatly appreciated @DieterHolvoet!
- 🇧🇪Belgium dieterholvoet Brussels
I'm not sure how to fork from @DieterHolvoet's existing branch
There should be a button at the top of the page saying Get push access. Afterwards click Show commands and you'll get the Git commands necessary to check out the branch locally.
- 🇵🇹Portugal gueguerreiro Lisboa
Thank you @DieterHolvoet, I pushed my changes directly to the branch
- Status changed to Needs work
9 months ago 11:28pm 10 April 2024 - 🇺🇸United States smustgrave
Will need a post update hook for the schema change.
- First commit to issue fork.
- 🇧🇪Belgium svendecabooter Gent
The MR seems broken since the changes in 📌 Remove dependency on jquery_ui_datepicker Needs work .
JQuery UI datepicker library seems to be removed since release 6.0.6.
So the MR should be updated, to be able to set the desired date format in another way. - 🇧🇪Belgium StryKaizer Belgium
This patch does not apply anymore indeed.
Since 6.0.6 uses the native date element, the localization of date formats already works out of the box (using browser settings), making this feature (controlling the exact format) a bit less necessary for most use-cases. - Status changed to Postponed: needs info
7 months ago 4:29pm 6 June 2024 - 🇺🇸United States smustgrave
So question is this needed by anyone anymore with removal of jquery?
- 🇧🇪Belgium dieterholvoet Brussels
I just tried out 7.0.0-beta1. For me personally this issue can be closed, since the browser now automatically uses a localized date format for the date picker.
- Status changed to Closed: outdated
7 months ago 7:29pm 9 June 2024 - 🇺🇸United States smustgrave
Thanks everyone that worked on this. Does seem to no longer be needed with removal of jquery.