mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[Time Picker] button tomorrow

Open gaetanodanelli opened this issue 1 year ago • 2 comments

Summary

it would be possible to add the tomorrow button, as well as the today button, in the date and time components?

Motivation

the incredible ease and customization of this project makes its components widely used, in the date fields, in addition to the today button it can often happen that you have to specify the date of "tomorrow" or "yesterday"

gaetanodanelli avatar Jun 22 '24 17:06 gaetanodanelli

Hello @gaetanodanelli, thanks a lot for your suggestion. I've added it to our board so we can discuss internally about it. If you are interested in contributing with this feature, we will be glad to review your PR! I would say one would want to start the investigation in this part of the code 😄

arthurbalduini avatar Jun 24 '24 09:06 arthurbalduini

@gaetanodanelli Could you clarify your intent? The [Time Picker] prefix is confusing me a bit. 🙈 Do you wish to have the option to add an additional button to the Action Bar as Arthur noted? If that's the case, we suggest creating a custom component to tailor this behavior as discussed here: https://github.com/mui/mui-x/issues/12049. Public access to the necessary hook is going to be provided in the near future.

LukasTy avatar Jun 26 '24 06:06 LukasTy

@gaetanodanelli could you check if the latest API allows you to achieve your desired behavior? 🤔

LukasTy avatar Apr 01 '25 08:04 LukasTy

@gaetanodanelli could you check if the latest API allows you to achieve your desired behavior? 🤔

@LukasTy Thanks for the follow-up! Yes, you understood my intention perfectly. I would like to have the option to add "tomorrow" and "yesterday" buttons in the Action Bar, just like the existing "today" button. Currently, I've solved this with a custom implementation similar to what was discussed in thread #12049, by adding custom actions to the action bar. However, I believe it would be very useful to consider adding these features as default options in the library, as they are common operations in many UI contexts. This way they would already be translated and consistent with the rest of the components, without requiring custom implementations. Thank you for the attention you're giving to this feature request!

gaetanodanelli avatar Apr 06 '25 18:04 gaetanodanelli