vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
426 stars 81 forks source link

[date-picker] Range select #1946

Open jouni opened 8 years ago

jouni commented 8 years ago

Range selection has currently been designed to work within one date picker.

We should evaluate different scenarios if they are better served with to individual pickers instead, or if we can and need to improve the single picker design in some way to accommodate more scenarios.

It’s not 100% clear to me how this relates to multi-select also, when the user can select many individual days from the picker, so it could be considered here as well.

jouni commented 8 years ago

For reference: http://www.skyscanner.fi/

tuomasnironen commented 8 years ago

https://www.google.com/flights/ https://www.airbnb.com/ http://www.momondo.fi/ https://fi.hotels.com/ https://github.com/motss/jv-datepicker http://codepen.io/davidkpiano/details/xwyVXO

tuomasnironen commented 8 years ago

Date Picker Scenarios: Range Select & Multi Select

tuomasnironen commented 8 years ago

Please review and comment the scenarios documented so far.

Also I would like to hear your thoughts about:

jouni commented 8 years ago

Scenarios 14-17: I would concentrate on the other scenarios first, nailing those before elaborating the last ones.

Calendar icon: I feel like that could be left for the developer to add manually, and wire it up to focus and open the date picker.

tuomasnironen commented 8 years ago

Updated the document:

@jounik Please review and notify if ok for "Done".

tuomasnironen commented 8 years ago

Revised the scenarios/wireframes document:

jouni commented 8 years ago

Added a couple of comments.

I’m still not comfortable about the very different layout for desktop (two months side-by-side). Also, the unbuffered mode is starting to feel the one we should initially drop, and concentrate on using the buffered mode for both single date and range selections.

That said, I think we can move this one back to the backlog to rest for a while, and get back to it once the development is at the point when we can consider implementing range selection.

samiheikki commented 7 years ago

Just a comment: This can easily be achieved by two date-pickers after the min and max attributes were added.

<template is="dom-bind">
  <vaadin-date-picker label="Start" value="{{startValue}}" max="{{endValue}}"></vaadin-date-picker>
  <vaadin-date-picker label="End" value="{{endValue}}" min="{{startValue}}"></vaadin-date-picker>
</template>
jouni commented 7 years ago

Seems like a nice workaround until we have it as an integrated feature 👍

jouni commented 7 years ago

@vaadin-marcus, you could use this workaround in Expense Manager ;)

jonadeline commented 6 years ago

FYI, a new polymer component with range option has been released recently : https://github.com/RoXuS/range-datepicker/

abdonrd commented 6 years ago

Any news about this? 😃

tomivirkki commented 6 years ago

Hi @abdonrd, no progress on this yet unfortunately. It's quite a requested feature so deserves a revisit.

heruan commented 5 years ago

It would be also very interesting to see also how vaadin-date-picker and vaadin-time-picker could integrate for a date-time range selection.

Currently it can be done using four components (two date pickers and two time pickers), but it would be much easier for the user to have a two (or even a single) component/overlay.

For example (from http://www.daterangepicker.com):

screenshot 2018-11-19 at 10 55 29