- 🇮🇳India vivek.kekare
This issue present in Drupal 10.0.x as well. Any update expected for this issue in core itself?
- 🇬🇧United Kingdom niklp Nottingham
I tried the hack in #7 but it didn't work for me under 10.x
I have had some success in combating the problem by using https://www.drupal.org/project/better_exposed_filters → but it's not perfect.
This is a very annoying bug for filtering dates (manifesting as timestamps) by exposed filter... :/
- 🇺🇸United States jphelan
#7 works with me in conjunction with the date_popup → module.
- 🇫🇷France PhilY 🇪🇺🇫🇷 Paris, France
#7 works for me using Drupal 10.3.6, patch is attached.
It should work with Drupal 11 as the views.views.inc file is the same for these 2 releases. - 🇺🇸United States smustgrave
Thanks for working on this but issues should be in MRs vs patches and will need test coverage.
- Merge request !10254Timestamp field should use date filter plugin rather than numeric filter plugin → (Open) created by jphelan
- 🇩🇪Germany u.kurilla
Like #13 the patch does the job for me in Drupal 10.3.6.
Thanks for the MR #16
I was happy when I found this issue and its solution - after a couple of hours! :-) - First commit to issue fork.
- 🇬🇧United Kingdom oily Greater London
Minor refactor of MR for code readability. Rebased MR. Test coverage still required.
- Status changed to Needs work
3 months ago 6:39am 17 January 2025 - 🇮🇳India joshua1234511 Goa
This MR is no longer necessary as the required changes have already been addressed in the source branch. The fix for the issue can be found in EntityViewsData.php.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/views...
- 🇫🇮Finland Tuuuukka
#21 if you're sure it's been fixed, this issue status can be set to fixed or closed..?
- 🇦🇺Australia gargsuchi Melbourne
Can someone please test issue against 11.x?
Also, do we still need tests for this? - 🇮🇳India joshua1234511 Goa
Tested the scenario again 11
- Steps taken
-- Created a content type and added a custom field of type timestamp.
-- Created a view that displays the content type
-- Added a filter for the created timestamp field.
- Test FailedEven after applying the change from this Drupal core commit, which sets the filter type to date, the mapping still does not work correctly for custom fields.
I am investigating further to resolve this issue.Related issue: https://www.drupal.org/node/2337515 →
- 🇮🇳India niranjan_panem Gurugram
We can alter the numeric date field to actual date time field through drupal's
hook_form_views_exposed_form_alter
below is the code using the hookfunction views_form_views_exposed_form_alter(&$form, FormStateInterface $form_state, $form_id){ if($form_id=="views_exposed_form"){ $form["field_published_date_time_stamp_value"]["#type"]='datetime'; } }
Below are the screen shots of before and after applying the drupal hook
Before
After