palantir/blueprint

DateInput closeOnUserDifferentMonthSelection

Open

#5,053 opened on Dec 1, 2021

View on GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P2Package: datetimeType: feature requesthelp wanted

Description

As per the following code:

https://github.com/palantir/blueprint/blob/e148da20dc778e3b177062f29a1f5930d7a0d8ac/packages/datetime/src/dateInput.tsx#L293-L299

I think this is unintuitive and we should have an option to close the popup when user select a date, even if its in a different month.

I am willing to raise a PR for v4 to add a closeOnUserDifferentMonthSelection, defaulting it to false. And if set to true, and a user selects for example last day of previous month, for it to close (as if they selected a day in the same month). Happy for any other name suggestion.

More often than not, we want to select a single business day. Usually Today, sometimes yesterday. When selecting yesterday it is a 2 click process, where any day in the same month (so for rest of month), it is a single click to select date.

Contributor guide