Skip to content

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

@TheInvoker

Description

@TheInvoker

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]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions