I've found a solution: the default value of the dat/time picker has to be Previous week. See the code below. In addition in its change section it contains code which converts the earliest and latest values to human readable form (earliest_str and latest_str).
<input type="time" token="range" searchWhenChanged="true">
<label>Set Date/Time Range</label>
<default>Previous week</default>
<change>
<eval token="earliest_tok">if(isnum($range.earliest$), $range.earliest$, relative_time(now(), $range.earliest$))</eval>
<eval token="latest_tok">if(isnull($range.latest$), now(), if(isnum($range.latest$), $range.latest$, relative_time(now(), $range.latest$)))</eval>
<eval token="earliest_str">strftime($earliest_tok$, "%Y.%m.%d")</eval>
<eval token="latest_str">strftime($latest_tok$ - 1, "%Y.%m.%d")</eval>
</change>
</input>
In order to have right earliest_str and latest_str just after opening the dashboard we have to initialize them in the init section of the dashboard:
<init>
<eval token="earliest_tok">relative_time(now(), "-7d@w0")</eval>
<eval token="latest_tok">relative_time(now(), "@w0")</eval>
<eval token="earliest_str">strftime($earliest_tok$, "%Y.%m.%d")</eval>
<eval token="latest_str">strftime($latest_tok$ - 1, "%Y.%m.%d")</eval>
</init>
In this init section the relative date format is to be used: "-7d@w0" and "@w0" which is equivalent to Previous week default value of the date/time picker input control.
... View more