continuouscalendar / jquery-continuous-calendar

Date picker and range selector with scrollable months instead of paged (the only right way to do it)
http://continuouscalendar.github.io/jquery-continuous-calendar/
85 stars 35 forks source link

Option to start new range on all clicks #42

Closed KevinTriplett closed 11 years ago

KevinTriplett commented 12 years ago

A user requested to me an option that instead of dragging the range, all clicks start a new range. Is this an acceptable option to suggest for the plugin? If yes, I will contribute this option.

eeroan commented 12 years ago

I didn't quite understand. Click already starts new range. Can you elaborate?

KevinTriplett commented 12 years ago

The case is when a user wants to create a new range that falls totally within the existing range.

So if the new range is completely within the existing range and does not share the start/end of the existing range, the user has two choices: 1) drag the range out of the way and then create the new range or 2) adjust the start of the existing range and then adjust the end of the existing range.

In either case, it is two drags instead of one. Plus, they know how to create a range by just clicking and dragging and so in this special case, they have to manipulate the existing range, so it's like having to learn two ways to do the same thing. Make sense?

eeroan commented 12 years ago

Ok, now I understand. That would disable the feature of moving the whole range. And when trying to move the selection one could remove it accidentally. I would not support it. What do you think?

KevinTriplett commented 12 years ago

It would definitely need to be an option, not the default behavior. I would be willing to support it. And I would want to wait at least a month to make sure my users really need this feature. Hopefully they do not, I would rather they get used to the current behavior.

eeroan commented 12 years ago

Ok. Let's wait and hope. We don't want this to become a feature creep! :)

KevinTriplett commented 12 years ago

Well, I apologize, I would like to propose this option. :(

My users want to start a new range and not move the existing range when they click within the range. Here is what they expect:

If they click the start or end of an existing range, they want to change the existing range start or end. BUT if they click another cell within the existing range, they want to CREATE a new range starting at that cell.

Here is the scenario: the user accidentally creates a large range that covers the range they originally wanted to create. In order to correct that error, they have to drag the range out of the way (by dragging the entire range elsewhere or shortening the range). This is especially case when the user is not trained on how the calendar behaves.

I know this creates feature bloat, but I argue that there is a legitimate business case for the two different ways to use the calendar. One case is that ranges are routinely moved. Another is the range may be extended/shortened but rarely (if ever) moved. If the range is never moved, then the user is not expecting the behavior of moving the range, they want to create a new range.

What do you think?

KevinTriplett commented 12 years ago

BTW, there is an odd behavior that happens that causes my users to accidentally create these large ranges.

They start to drag within the calendar, but then drag outside the calendar and release the mouse button. The drag event is still active, so when they mouse back into the calendar, they are still selecting a range and they get either confused or freaked out and they click somewhere in the calendar to either start or stop the range but end up creating these huge ranges that they must then have to deal with.

Try it yourself (it does this in Firefox and Chrome): start dragging, move your cursor out of the calendar container, release the mouse button, then move your cursor back into the calendar container.

I think they do this because they start the range on the wrong date, then try to terminate the range by moving outside the calendar to abort the selection. I've observed my users doing this enough times that it's definitely an issue for them.

BTW, this calendar plugin is REALLY NICE, I can't adequately express my appreciation for it, it's a major component of our application. So it's getting a lot of usage here. :D

I suggest we address this behavior -- if you agree, I can open a separate issue for it since we would need to agree on the best approach how to terminate the drag.

eeroan commented 12 years ago

Perhaps in that case I could remove the support for moving ranges for good. I'm not sure how many users will miss it. Would you mind resolve the bug you found also? ;)

Nice to hear someone is using my calendar :)

KevinTriplett commented 12 years ago

I know one other company that uses your calendar (which is where I found it) http://www.lensrental.com. Like them, I also rent filmmaking equipment, which is why the range feature is important to us.

The differentiation between your calendar and most all others is the range feature -- so I suggest leaving the ability to move the range and add this new initialization option to create new ranges whenever not adjusting the start/end. I think it should be an easy option to implement.

I will investigate both these issues and get back to you before doing any work so we can discuss. Thanks!