I have a dashboard containing two radio buttons, one for 'Current quarter' and one for 'Previous quarter'. I also have a timepicker input field for customizing the time range for a query. Following is the XML code for the input fields:
<input type="radio" token="quarter_token" searchWhenChanged="true">
<label>Select quarter...or...</label>
<choice value="earliest=@qtr latest=@d">Current quarter</choice>
<choice value="earliest=-1qtr@qtr latest=@qtr">Previous quarter</choice>
</input>
<input type="time" token="time_token" searchWhenChanged="true">
<label>Select date range</label>
<change>
<set token="form.quarter_token"></set>
</change>
<default>
<earliest>@qtr</earliest>
<latest>@d</latest>
</default>
</input>
My question is: How can I reset the timepicker Label text to match the radio button selected time range? Currently, if a user selects a custom time range, then selects one of the radio buttons, the timepicker label doesn't match the radio button time range selection. For example, can I simply do the following to reset the timepicker label?
<set token="form.time_token.earliest">@qtr</set>
<set token="form.time_token.latest">@d</set>
In the example attachment, the timepicker lable shows 'Last 55 days' as well as the 'Previous quarter' radio button being selected. This situation presents an inconsistent UI.
thanks in advance,
Bob