mui / mui-toolpad

Toolpad Studio: Low-code admin builder. Open-source and powered by MUI.
https://mui.com/toolpad/
MIT License
875 stars 216 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 10 months 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 10 months 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 10 months 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 10 months 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.