palantir/blueprint

DateInput closeOnUserDifferentMonthSelection

Open

#5,053 建立於 2021年12月1日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)TypeScript (20,263 star) (2,167 fork)batch import
P2Package: datetimeType: feature requesthelp wanted

描述

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.

貢獻者指南