mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
1.27k stars 282 forks source link

Support Date Range Picker component #2209

Open Janpot opened 1 year ago

Janpot commented 1 year ago

Summary 💡

Toolpad should support the Date Range Picker component.

Benchmarks

Motivation 🔦

Was missing this on https://github.com/mui/mui-toolpad/pull/2151.

oliviertassinari commented 1 year ago

We have a couple of apps to support MUI's operations that depend on a date range picker:

One thing that we very frequently use is presets: *last month in our case. Presets would be the primary value for me.

Janpot commented 1 year ago

One thing that we very frequently use is presets: *last month in our case. Presets would be the primary value for me.

Would this make sense as an MUI X feature?

oliviertassinari commented 1 year ago

Would this make sense as an MUI X feature?

Interesting question, I assume you couldn't find it on the docs. Then a few ideas for @flaviendelangle

  1. I have tried to search the feature with "preset". People coming Ant Design https://ant.design/components/date-picker#components-date-picker-demo-preset-ranges would be used to it. It's also used in https://vercel.com/design/calendar#presets. I couldn't find a match on Algolia. Maybe we should place this keyword to have a match with https://mui.com/x/react-date-pickers/shortcuts/.

  2. The spacing could feel better https://codesandbox.io/s/fervent-stallman-k362g6?file=/Demo.tsx

Current

Screenshot 2023-08-14 at 18 37 44

Proposed:

Screenshot 2023-08-14 at 18 36 38
  1. A demo at https://mui.com/x/react-date-pickers/date-range-picker/ could be great. I feel like my day-to-day use cases for date range pickers are between 60% - 40% shortcut-based.

Task created for it https://www.notion.so/mui-org/Date-Picker-preset-polish-c48165a4dac74c3facb989218d4711b3.

Janpot commented 1 year ago

I assume you couldn't find it on the docs

I didn't look for it, I interpreted your comment as requesting this as a specific feature for Toolpad. I wasn't aware this was already a feature in X. 👍 we should add it in the Toolpad implementation.