vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.32k stars 6.93k forks source link

[Feature Request] Add ability to pick indefinite date ranges in date picker #9098

Open TheInvoker opened 4 years ago

TheInvoker commented 4 years ago

Problem to solve

Currently date picker range allows you to pick only a fixed date to a fixed date. What I want is the ability do pick [fixed date, fixed date], [-infinity, fixed date], [fixed date, infinity] or [-infinity, infinity]. Essentially <= fixed date, or >= fixed date or 'all dates' in addition to regular range.

Proposed solution

Add a prop to the date picker to allow indefinite, which renders a 4 set radio button.

  1. default behavior, allows fixed date to fixed date (can pick 2 dates on picker)
  2. allows a fixed date and everything before (can only pick 1 date on picker)
  3. allows a fixed date and everything after (can only pick 1 date on picker)
  4. allows selection of all dates (cannot pick any date on picker)

The return values would be these respectively:

  1. ['01-01-2019', '01-10-2019']
  2. [null, '01-01-2019']
  3. ['01-01-2019', null]
  4. [null, null]
TheInvoker commented 4 years ago

This also ties in with a calendar event date range, where it accepts any of the 4 date range types listed above.