Updated my previous example to use tokens as input for the date ranges. <form theme="dark">
<label>Cascading Date Selector</label>
<fieldset submitButton="false">
<input type="radio" token="day_type" searchWhenChanged="true">
<label>Day Type</label>
<choice value="*">All</choice>
<choice value="day_of_week IN (Mon,Tue,Wed,Thu,Fri)">Business Week (Mon-Fri)</choice>
<choice value="day_of_week IN (Sat,Sun)">Weekends (Sat-Sun)</choice>
<default>day_of_week IN (Mon,Tue,Wed,Thu,Fri)</default>
</input>
<input type="radio" token="year" searchWhenChanged="true">
<label>Year</label>
<choice value="*">All</choice>
<default>*</default>
<fieldForLabel>year</fieldForLabel>
<fieldForValue>year</fieldForValue>
<search>
<query>| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort -starttime
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_week_num=strftime(starttime,"%w")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval month_num=strftime(starttime,"%m")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search $day_type$
| dedup year
| table year
| sort -year</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="dropdown" token="month" searchWhenChanged="true">
<label>Month</label>
<default>*</default>
<fieldForLabel>month</fieldForLabel>
<fieldForValue>month</fieldForValue>
<search>
<query>| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort starttime
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_week_num=strftime(starttime,"%w")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval month_num=strftime(starttime,"%m")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search $day_type$ year=$year$
| dedup month
| sort num(month_num)
| table month</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<choice value="*">All</choice>
</input>
<input type="dropdown" token="day_of_week" searchWhenChanged="true">
<label>Day of Week</label>
<choice value="*">All</choice>
<default>*</default>
<fieldForLabel>day_of_week</fieldForLabel>
<fieldForValue>day_of_week</fieldForValue>
<search>
<query>| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort -starttime
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_week_num=strftime(starttime,"%w")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval month_num=strftime(starttime,"%m")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search $day_type$ year=$year$ month=$month$
| dedup day_of_week
| table day_of_week day_of_week_num
| sort num(day_of_week_num)
| table day_of_week</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="dropdown" token="day_of_month" searchWhenChanged="true">
<label>Day of Month</label>
<choice value="*">All</choice>
<fieldForLabel>day_of_month</fieldForLabel>
<fieldForValue>day_of_month</fieldForValue>
<search>
<query>| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort starttime
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_week_num=strftime(starttime,"%w")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval month_num=strftime(starttime,"%m")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search $day_type$ year=$year$ month=$month$ day_of_week=$day_of_week$
| dedup day_of_month
| sort num(day_of_month)
| table day_of_month</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<default>*</default>
</input>
<input type="dropdown" token="date_time_range" searchWhenChanged="true">
<label>Date</label>
<choice value="*">All</choice>
<default>*</default>
<fieldForLabel>date</fieldForLabel>
<fieldForValue>time_range</fieldForValue>
<search>
<query>| gentimes start=-365 end=1
| sort -starttime
| eval earliest=starttime
| eval latest=endtime
| eval time_range="earliest="+earliest+" latest="+latest
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_week_num=strftime(starttime,"%w")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval month_num=strftime(starttime,"%m")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search $day_type$ year=$year$ month=$month$ day_of_week=$day_of_week$ day_of_month=$day_of_month$ $date_time_range$
| table date time_range</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="text" token="days_to_look_back" searchWhenChanged="true">
<label>Days to look back 365=1 year</label>
<default>365</default>
</input>
<input type="text" token="days_to_look_forward" searchWhenChanged="true">
<label>Days to look forward 1=Today</label>
<default>1</default>
</input>
</fieldset>
<row>
<panel>
<title>Example query with subsearch to return date ranges as query constraints:</title>
<html>
<strong href="" style="color:white">your base query
[| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort -starttime
| eval earliest=starttime
| eval latest=endtime
| eval time_range=\"earliest=\"+earliest+\" latest=\"+latest
| eval day_of_week=strftime(starttime,\"%a\")
| eval day_of_month=strftime(starttime,\"%d\")
| eval year=strftime(starttime,\"%Y\")
| eval month=strftime(starttime,\"%b\")
| eval date=strftime(starttime,\"%a %m-%d-%Y\")
| search year="+"$"+"year"+"$"+" month="+"$"+"month"+"$"+" day_of_month="+"$"+"day_of_month"+"$"+" day_of_week="+"$"+"day_of_week"+"$"+" "+"$"+"day_type"+"$"+" "+"$"+"date_time_range"+"$"+"
| table earliest latest
| return 1000 earliest latest]
</strong>
</html>
</panel>
</row>
<row>
<panel>
<title>Dates</title>
<table>
<search>
<query>| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort -starttime
| eval earliest=starttime
| eval latest=endtime
| eval time_range="earliest="+earliest+" latest="+latest
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search year=$year$ month=$month$ day_of_month=$day_of_month$ day_of_week=$day_of_week$ $day_type$ $date_time_range$
| table year month day_of_month day_of_week date time_range</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="count">100</option>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">true</option>
<option name="wrap">true</option>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="day_of_month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="year">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="day_of_month">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
<format type="color" field="day_of_week">
<colorPalette type="sharedList"></colorPalette>
<scale type="sharedCategory"></scale>
</format>
</table>
</panel>
<panel>
<title>Date Constraints Returned</title>
<table>
<search>
<query>| gentimes start=-$days_to_look_back$ end=$days_to_look_forward$
| sort -starttime
| eval earliest=starttime
| eval latest=endtime
| eval time_range="earliest="+earliest+" latest="+latest
| eval day_of_week=strftime(starttime,"%a")
| eval day_of_month=strftime(starttime,"%d")
| eval year=strftime(starttime,"%Y")
| eval month=strftime(starttime,"%b")
| eval date=strftime(starttime,"%a %m-%d-%Y")
| search year=$year$ month=$month$ day_of_month=$day_of_month$ day_of_week=$day_of_week$ $day_type$ $date_time_range$
| table earliest latest
| return 1000 earliest latest</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="count">10</option>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
<option name="rowNumbers">true</option>
<option name="wrap">true</option>
</table>
</panel>
</row>
</form>
... View more