Bricks Version: 1.5.7
Browser: Brave 146.134
OS: macOS
URL: [(Metamorphosis – Motherwort)]
Problem: Bricks displays the wrong date value for jetEngine custom date fields if saved in ‘default’ date format, but can meta query it properly. And using a date field saved as a timestamp, it displays and sorts correctly, but won’t filter the query. Screenshots at the bottom.
Detailed steps to reproduce:
Bricks and JetEngine, absolutely no other plugins.
Make a custom CPT with jetEngine having 2 date fields.
Save one date field as the ‘default’ type, and on the other set the slider to ‘timestamp’ in the settings as seen in the screenshot.
I named them ‘date-default, and ‘date-timestamp’
Make a few dummy posts in your CPT, some that contain future dates, some past, ensure that the pairs of dates are the same within each post.
In Bricks, place 2 headings in a container, 1 for each date field and use a dynamic data request to populate their text.
Prepend each dynamic value with their respective DB key to keep track of them.
Use the container to set a query loop for the CPT you made above.
You should see a list of date pairs.
The date field saved with the ’timestamp’ option will display the date as entered.
The date field saved with the ‘default’ option will display the CURRENT DATE (and if you use a datetime field it updates when the browser is refreshed to the current time)
The one saved as a date field with the ‘timestamp’ option (that shows the correct date) if used as a meta query filtered against the current date will NOT filter the posts. it lets all of them through.
HOWEVER, using the same query with the ‘default’ date (that shows the current date) will query correctly! (both fields seem to sort correctly though.)
So it seems I can either choose a format that displays correctly but I cant filter with, or can filter but displays the wrong date.
Any insight would be greatly appreciated! I would prefer to not ask my client to enter all of their dates in duplicate…
Screen shots:
Confusingly, sorting seems to work with either date field.
Meta query with the date formatted as default (date-default) works other than the display of the date itself.
Meta query with the timestamp formatted date (date-timestamp) displays correctly but won’t filter.