range using entry_date
Hi
What is the syntax for date ranges using {entry_date}
when I use range:entry_date="2011-01-01;2012-02-31" I am presented with a blank page
Hi
What is the syntax for date ranges using {entry_date}
when I use range:entry_date="2011-01-01;2012-02-31" I am presented with a blank page
Replies
Low 19 Sep 2012 14:21
Hi Chris,
The range parameter applies to custom fields only, at the moment. Since this is an entry date, you could use the start_on="" and stop_before="" parameters.
The fact that you're getting a blank screen is because of a MySQL error that's triggered. That, of course, should never be the case. I'll look into fixing that at least.
Chris 19 Sep 2012 14:33
thank you... again
jared Laser 6 Feb 2013 16:17
Hey Low- Just wanted to confirm that I still can not query by entry_date? The language here is a little confusing to me so wanted to check with the master.
thanks!
Low 6 Feb 2013 16:19
Well, you can, but use the start_on="" and stop_before="" parameters as linked above.
jared Laser 6 Feb 2013 17:14
Apologies if I'm missing something basic but should those parameters be used on the exp:low_search:results tag?
I've done the following in my search form:
<input type="date" name="start_date" value="{low_search_start_date}">
and the parameter I've added in low_search:results is:
start_on="{low_search_start_date}"
The resulting output via template debugging is as follows:
(0.009482 / 9.74MB) Tag: {exp:low_search:results status="not closed" disable="member_data" query="eyJjb2xsZWN0aW9uIjoicHJlc3NfcmVsZWFzZXMiLCJyZXN1bHRfcGFnZSI6ImFib3V0LXVzXC9zZWFyY2gtcmVzdWx0c1wvJXMiLCJzZWFyY2hfbW9kZSI6ImFsbCIsImtleXdvcmRzIjoiZmFjZSIsInN0YXJ0X2RhdGUiOiIwMjM1LTEyLTMxIn0" start_on="{low_search_start_date}" }
You can see a gist of what I've done here: https://gist.github.com/imjared/52c34...
Low 6 Feb 2013 17:41
You can either use it as a parameter in the Results tag:
Or you can use it in the form as an input element: