1

I'm using Drupal 8. I created a new content type (title, body, image, date). The date is a timestamp field.

I used the devel module and the Realistic Dummy Content module to generate a test content for my view test.

I created my test view and chose the date as an exposed filter.

Here is my configuration: enter image description here

And this is my view: enter image description here

When I apply my filter, I want to say all contents having a date greater than my input:

If I test with 01/31/2018 - 02:54, nothing was changed!

But If I test with the unix value: 1538323253, my filter works well!

Any idea please to make the filter with human readable value?

  • What happens if you reproduce the same thing with a Date field? – 4k4 Jan 16 at 10:19
  • The date filter is not working! When I apply it, the result still the same – A.Sana Jan 16 at 10:29
  • 1
    I'd expect it needs a UNIX timestamp as input... – leymannx Jan 16 at 10:56
  • 1
    @leymannx, yes thank you! if I test with a value as 1538323253 the filter works well, but it's not what I need! – A.Sana Jan 16 at 11:16
  • Then, please, completely rephrase your whole question. – leymannx Jan 16 at 11:19
-1

https://www.drupal.org/project/date_popup

This will add the native HTML 5 date popup widget to all date fields in views filters.

But this module won't work with timestamp fields.

  • 1
    OP doesn't use a date field. OP uses a timestamp field. Does Date Popup work with timestamp fields as well? – leymannx Jan 16 at 11:41
  • Oh! Yes, it won't work with timestamp fields. Updating my answer – ktrev Jan 16 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.