I have read a few different posts on how to filter search results using a custom date field, and on using a range of dates as well. However, I need to filter my results by the native entry_date. I have tried a multitude of things from using date ranges, trying to use exact parameters and more. This is my latest markup:
Search Tag
{exp:low_search:form collection="albums" query="{freebie_3}" result_page="/daily-photos/results/" form_class="internalSearch photoSearch" secure="no"}
<input type="text" placeholder="MM/DD/YYYY" class="searchDatepicker text search"/>
<input type="hidden" id="actualDate" name="search:entry_date">
<button type="submit" class="searchBtn" aria-hidden="true" data-icon=""></button>
{/exp:low_search:form}
Results Tag
{exp:low_search:results query="{freebie_3}" limit="15" paginate="bottom" paginate_base="/daily-photos/results/"}
Datepicker Javascript
$('.searchDatepicker').datepicker({
altField: "#actualDate",
altFormat: "yy-mm-dd 12:00 'PM'",
dateFormat: "mm/dd/yy",
gotoCurrent: true,
maxDate: "+0d"
});
You can see where I was trying to resolve a suspected timestamp issue by adding a default timestamp in the javascript. My thinking was to have a default timestamp as shown and then in the search, setting the range for the entry_date to be from yy-mm-dd 12:00 AM to yy-mm-dd 11:00 PM, but I haven't been able to achieve this, and I'm not sure if there's just something basic I am overlooking? I am using Low Search in several other places across the site, so I'd like to be consistent and use it for this scenario. My search results just return all entries with no filtering.
I am running EE 2.5.5 and Low Search 2.2.1. Thanks for looking!