I couldn't think of a more descriptive title, but this is what I'm wondering:

I have a Date Range selector box. It's quite straightforward, it has two calendars, one for the "From" date, and another one for the "To" date. "Today" is always the default (in both boxes). When you click on any date in the "From", I'm making it automatically change the "To" date to the same day.

enter image description here

Is this a good practise? Are there any disadvantages I'm missing here? I like the functionality, because the user is most likely going to pick a "To" date that is in the future (the problem of the user changing his/her mind and going back to change the From date is solved if I disable this "automatic selection" once the To has been clicked for the first time), but I'm not sure if there are downsides.

Edit: The product is a web app for collaboration, and the Date Range is used for doing searches of past information. So the range can be anything, from a week's to a year's difference.

3 Answers 3


I don't think there's a single right answer here—it depends on the likely behaviour the user will want based on what you're searching for. If there is a very high volume defaulting to a single day is a good thing.

For some kinds of data it's very likely the user will want the "to" date to default to now/today.

For some kinds of data they'd want the "from" date to default to the date of the first record in the dataset and the "to" date to default to the date of the last record in the dataset.

You have mentioned now that the data is logs and that, so far as you can tell, users are no more likely to want a week's data than a year's.

My recommendation then is to default the "to" date value to now/today (which seems to be naturally the maximum-possible date), let the user change the date if they so choose, and only override their setting if it would lead to a logical error (e.g. if the "from" date defaults to a year ago, they change the "to" date from today to the 1st of January and then change the "from" date to the 1st of February—in that case, since the "from" date is after the "to" date, you can reasonably update the "to" date to match the "from" date; setting both values to 1st of February).

In order to make that more obvious, you should automatically and obviously disable the user from selecting a "to" date that precedes the "from" date. That means if the user notices that their "to" date has changed, they can't go back in and select the previous value, and you can provide clear affordances that the date range must be a positive number of days.

  • I added the information. The use is not very specific, it's for searches and dates can range from days to months or years. Thanks!
    – Yisela
    Commented May 28, 2012 at 2:50
  • OK, there's still a bit of a question about what the likely search ranges are based on your expectations of your users' behaviour, but I think I can update my answer to make it more useful for you.
    – Kit Grose
    Commented May 28, 2012 at 3:37
  • 1
    +1 As a side remark: also consider reporting ranges on arbitrary number of days. In that case it may suit the user better to change the "other" date by the same amount as the user changed the "one" date (goes both ways), keeping the duration the same. With fixed reporting periods like weeks and months: adjust the "To" date to match the end of that period, again keeping the duration the same (with months this may of course imply a different number of days). Commented May 28, 2012 at 9:36

"From" "To" date fields are very important for date range selection.

Also, we need to consider what type of use cases we need to address. If we are giving for Hotel/Flight/Car booking websites, we can give straight options like - Today - This Week - This Month etc....

If we giving this option for some filters in list view / Reports we can give options like - Last Month - Last Year etc...

Otherwise, custom options like "From Date" to "To Date". If we click on "From" date, we can show the both date component like original post image.

enter image description here

  • +1 For suggestion of "functional" names to identify dates and date ranges. Most people struggle to find the dates for "last week". Having the system work it out for you, is helpful. I would show the dates involved though, for example in (smaller) non clickable text following the "functional name. It aids in recognising the one you want. Commented May 28, 2012 at 9:39

It definitely is not a bad idea to change the "from" to match the"to" in any instance. Many websites do this and it's quite convenient to me. One thing you might consider is what exactly your users are using the calandar for. If it is an instance where the users are required to have a minimum of say 2 days booked in a hotel, it's not a bad idea to default switch the "to" to 2 days after the "from". Or if it is airlines, you could possibly get away with defaulting the "to" a week in advance as users probably aren't going to fly out and back in on the same day. That being said, I would be careful of making it X number Of days in the future unless you are absolutely sure of how the 95% of users will use your application.

  • I added the information, thank you for your answer
    – Yisela
    Commented May 28, 2012 at 2:50
  • If it's for a collaboration app, I can't imagine the user would ever need to find data in the future, as it would return non existent or very little data. In this specific case, I'd think when they change the "from" date, it should stay on "today".
    – Earle
    Commented May 28, 2012 at 2:58

Your Answer

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

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