we are having a box with search criteria. The criteria are shown in a simple way, and can be expanded to a view with 'more search criteria'.

Search criteria

In this example, a code can be searched for, with several criteria. Some of the criteria can be relative, like dates in the 'Expires' section. Users should be able to give a relative date, like "previous week" or "the last 3 months".

These criteria can also be used later.

I would like to know if this behaviour already exists as a design pattern, and if not, how you can propose these options to a user? Should the value for such criteria also be saved? (when re-using this saved search, is it the last three months from today, or from the moment that these criteria were saved?)

  • Can you clarify what you mean by "relative criteria"? Do you mean two or more fields that relate to eachother, i.e. the 'from' and 'to' date fields?
    – Matt Obee
    Sep 19, 2012 at 15:24
  • No, what I mean is that the dates or relative, e.g. the from field that contains something as "Today" or "the last 90 days". e.g: from 90 days before to today
    – Kim
    Sep 19, 2012 at 15:28
  • Have a look at how rememberthemilk.com handle their date entry. (Albeit for future dates, not historic dates)
    – JonW
    Sep 20, 2012 at 8:24
  • I really hope that's not what your form actually looks like. If it is, you probably have bigger problems on your hand. Read up on proper design principles: amazon.com/Web-Form-Design-Filling-Blanks/dp/1933820241 Sep 20, 2012 at 21:46

2 Answers 2


The best thing I can think to do would be to have a select box with the possible "relative" timings, such as "Last Week", "Last 90 days", etc., and then finally, have one of the options be "Specific Date Range". Selecting that would then allow the user to enter specific dates. Otherwise, the control wouldn't be shown.


I agree with @thatuxguy. Google Analytics is perhaps a good example. It has a 'Date Range' dropdown which includes pre-set ranges like 'Today', 'Yesterday', 'Last Week' and 'Last Month', as well as a 'Custom' option. The latter enables the manual date range input.

Google Analytics date picker

With regards to the part of your question about saved searches ("Should the value for such criteria also be saved" and "when re-using this saved search, is it the last three months from today...?") I would suggest you always treat relative dates as being relative to the present day. I'm not sure what benefit the alternative would offer - a user can easily enter an arbitrary date range and save that instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.