Tell us what you are trying to do?
I have a WWI website. I want to offer a date search, preferably of the "between" type.
I have created a test custom posttype for the purpose of testing the possibilities.
It does not work. I have tried several scenarios: datefield as a datefield, datefield as a string, searching as string, date or number. Searching between, greater than, ...
Dates older than 1970 are NEGATIVE numbers. Can Toolset handle them properly? The documentation states that they are positive numbers.
Is there any documentation that you are following?
yes: https://toolset.com/documentation/user-guides/views/date-filters/
Is there a similar example that we can see?
I can give you access to the site, and the testpage.
What is the link to your site?
not on published pages; I can give you access in private message.
Hi,
Thank you for contacting us and I'd be happy to assist.
To troubleshoot this, I'll need to see exactly how this search filter is set up in the admin area.
Can you please share temporary admin login details, along with the link to the page where this search can be seen?
Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.
regards,
Waqar
Thank you for sharing the admin access.
I've made some changes to the search filter for the "testeventdate" field and the date range search is working now.
In the search filter settings, I've selected the type of control to "datepicker", compare value as "number" and the comparison type to "between".
( screenshot: hidden link )
The way Toolset's date type custom field works, it stores the selected date's UNIX timestamp value at 12 am that day, as a raw custom field value.
As long as you're importing the date type custom fields data in the same format, you'll be able to use the date filter/search in views, without any issue.
I hope this helps and please let me know if you have any follow-up questions.
Not sure what i did wrong in my testing, but, hey, it works perfectly now.
I suspect I never tried the combination 'date-picker' and 'search as number'.
Thank you very much.