Tell us what you are trying to do?
I am trying to use a view to create an upcoming events listing of The Events Calendar events so that I can get more control over the appearance and output of the events.
Is there any documentation that you are following?
https://toolset.com/forums/topic/format-the-event-calendar-date-outputted-by-views/
Is there a similar example that we can see?
What is the link to your site?
hidden link
The view seems to be ignoring my filter. It doesn't register that it exists. I have to add another filter in order to see it in the view block editor.
Hi,
Thank you for contacting us and I'd be happy to assist.
The Toolset's date/time filters are designed to work with the values in UNIX timestamp format. That is the same format in which Toolset's own date-type field stores the values.
( ref: https://toolset.com/course-lesson/filtering-toolset-views-by-dates/ )
The Events Calendar plugin on the other hand stores the event date/time values in human-readable formats.
( as defined in the plugin's settings )
To overcome this difference, you can add a new 'Event Start Date' date type field through the Toolset Types plugin with the events post type.
When adding or editing each event, you'll just need to make sure that you're storing the start date in this Toolset field too. This field will help you in applying Toolset's own date/time filters in the views.
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Have you got a code snippet that helps me copy the data from the built-in start date field to the Toolset start date field?
Thanks for writing back.
I'm afraid, I don't have a copy/paste code snippet available for this, but you can use the 'save_post' hook to fire a custom function, that is executed each time an event post is created or updated:
https://developer.wordpress.org/reference/hooks/save_post/
That function will need to get the start date value from the Events Calendar's custom field, convert it to the UNIX timestamp format and then save it in the Toolset's date type field.
For more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
My issue is resolved now. Thank you!