Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Add Date Range selection to x-calendar #40

Closed
dlindenkreuz opened this issue Aug 28, 2013 · 12 comments
Closed

Add Date Range selection to x-calendar #40

dlindenkreuz opened this issue Aug 28, 2013 · 12 comments

Comments

@dlindenkreuz
Copy link

I highly recommend adding proper date range selection to the x-calendar component as selecting multiple dates one by one is not what users expect. Every calendar "widget" should provide this feature (and I guess most of the good ones do).

@ldoubleuz
Copy link
Contributor

If you want to be able to just pick a start and end date for a range instead of selecting the dates themselves, you can simulate this for the moment by utilizing two <x-datepicker>s, similar to how jQuery UI does it.

However, date range selection would be a good feature, so adding a feature to restrict the available dates on an x-calendar would allow the UI for x-datepickers to be more intuitive, and is something we'll keep in mind.

@p0ffsrule
Copy link

Is it ok if I tried working on this?

@sole
Copy link
Contributor

sole commented Feb 10, 2014

While we wait for @potch or @pennyfx to confirm it's OK to take this bug, I'd say go ahead if this is an issue that interests you, and let us know how it works for you--any issues or stumbling blocks you find, etc.

Thanks for contributing! 😄

@p0ffsrule
Copy link

I'd just need to know a few details about how exactly you'd need it implemented. Like the UI and so on.

@sole
Copy link
Contributor

sole commented Feb 10, 2014

This is something someone suggested... What about sketching some ideas and discussing them before coding anything? :)

@p0ffsrule
Copy link

Right. I thought it could be added to the 'multiple' attribute and have a little button to add a range selection mode where the next 2 dates selected would define the range. Only thing is that there wouldn't be any space in the layout for such a button.

@p0ffsrule
Copy link

Or would it be better if I created a new attribute 'range'? Seems like overkill...

@sole
Copy link
Contributor

sole commented Feb 11, 2014

So these are the current attributes:
http://mozilla.github.io/brick/docs.html#x-tag-calendar

multiple allows for multiple dates to be selected and chosen holds the dates themselves.

I was thinking that one way of approaching this could be to have a allowRanges attribute (or just ranges?) that when present allows you to "point and drag" several dates (starting from the first one you selected). Internally we would simply update the chosen data according to whatever was in the range.

@p0ffsrule
Copy link

But the point and drag wouldn't be very convenient if the range spanned more than 1 month.

@sole
Copy link
Contributor

sole commented Feb 11, 2014

Yeah I thought that for a moment, too. But we want the point and drag to quickly select dates rather than clicking on each of the potentially 31 days in the month, right? This would be a solution to that issue: if allowRanges is enabled, holding down and moving the finger or clicking down and dragging should select multiple dates.

I think the "spanned more than 1 month" is another problem :-)

@p0ffsrule
Copy link

OK. I'll try it like that.

@dotch
Copy link

dotch commented Jul 16, 2014

closing because it will tracked in the individual repo at mozbrick/brick-calendar#3

@dotch dotch closed this as completed Jul 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants