Open NicolasRannou opened 8 years ago
Awesome element btw :)
I am not sure but I think what you want is able by using min-date
and max-date
am I right?
Hmm no, min/max-date doesn't allow the user to pick 2 dates, it just allows the user to pick 1 date within a range, right?
I want to get 2 dates out of the date-picker element, and highlight the dates in between if possible.
Oh sorry I did not understand what you mean... Effectively I do not think the feature you mentioned exist any more, what I mentioned was to pick only one date within a range like you say, another time sorry for my mistake ;)
The MD spec doesn't cover the UX for this, and this component is intended to be (within reason) a reference implementation. So, I'm hesitant to change the component much to add this functionality when it can be done more simply with two date fields. I would, however, be interested in seeing mock-up ideas for how this might work while not straying too far from the spec.
If it makes sense to pull paper-calendar
out into a separate component that would allow for more customization, I'd be more apt to do that, and add some more fine-grained features to paper-calendar, such as tracking an array of disabled / allowable dates (see #113), and a "range" mode.
Thanks that makes sense. I actually used 2 date pickers (one for start and one for end data), which is more than enough.
I think that a feature such as the one described in #113 would be a perfect alternative (Angular team included it in theirs Date Picker implementation ([1]).
Anyone implemented date range using this datepicker ? Yes, date range would be great addition to this plugin as it is a frequently used feature.
Not yet. There is edk-date-picker, which has this feature, but it is outdated.
Here is a just released range date picker inspired by Airbnb one : https://github.com/RoXuS/range-datepicker
Often times you want to select a starting date and a finishing date (hotel, trip).
It would be great to be able to do it with this element, maybe adding a "range" or "multi" or whatever flag