4

I'm trying to design a date range picker, with the caveat that there be a way to designate the end date as "present".

Has anyone seen a clever way of doing this without the need for a check box?

UPDATE:

I came up with this, any obvious drawbacks here?

Date range selector

  • Can you provide some more context? What do you mean by "present" - is it "today" or some currently selected date? – agib Nov 15 '11 at 8:59
  • This is for a date range for how long you've had a job. So "present" means just that, through present. That means "present" should not map to a static date, like today. – CambridgeMike Nov 15 '11 at 14:29
  • Looks good to me, maybe have some kind of horizontal line separator to indicate that the options are mutex. – Jake Berger Nov 15 '11 at 17:35
  • Thanks for the better description and picture. Since "present" in this context is a unique state you're going to have to have some sort of unique control to "set" it. A simple button or check doesn't seem unreasonable – Ben Brocka Nov 15 '11 at 19:30
2

jQuery UI's datepicker demo has some nice ways to deal with this situation. One is their "button bar" which allows you to have buttons with your datepicker, allowing you to add commands like "todays date" ect:

enter image description here
Example from JqueryUI

Note how the current date is also highlighted. Using two datepickers, like the date range in this example jQuery Datepicker, one for start date and one for end date, you can use the highlighted current day as an easy way to start/end a date range on "today". in addition you could add a button to one or more datepickers, like the below:

enter image description here

This allows quick access to set either calendar's date to the present date.

In addition if most searches are going to use today's date, you might just default to the current date and let users specify the end date only if they need to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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