-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pickers] Improve customization for Buttons and Tabs across pickers #12049
Comments
@LukasTy looks like a good enhancement ... will put this on the board. |
@bruns6077 Thank you for creating this issue. In regards to As for the Tabs component, indeed, there is no way to pass even |
hey, building your own component is no option i have tested it yesterday, i will edit my initial post. ( with custom component we are still limited to the same stuff we would have in the pre defined ready-to-use picker component regarless of its type (timePicker, datePicker etc.)) so what is needed is the following : for actions and tabs: pass the color prop to benefit from defined color theming for actions (optional): dynamic component rendering, maybe we dont want to render a button but maybe we want to render a IconButton or even something else, another possibility would also be to provide a placeholder action which takes a function argument where we can exactly do this but with the ability to hook into existent onClick handlers like onCancel etc. and some other optional stuff would be: passing color prop to the picker itself and reflect it on the picker dialog or paper, currently i am manually adding it over classNames |
@bruns6077 Could you confirm if this is something you are trying to achieve? |
@LukasTy yes i can confirm that i am trying to achieve something like that. currently i have a workaround (based on the dialog class i have overridden the tabs and buttons with already defined styling for them so currently i have duplicated code in my theme file) will remove this part once this feature is included. well overriding the slots would mean also to override the handlers and defining them. in my opinion the ready-to-use one is very nice and customizable but it has lack of props atm. btw: i created another enhancement ticket which could also have high priority: 12072 |
another enhancement ticket i created: with this 3 enhancement we have a really solid base of customization and realization of complex booking mechanisms or other mechanisms |
During the grooming, we decided to start by providing a better complete example of overriding the In regards to the concern of the need to redefine action handlers, it would not be needed, they are only being passed down to the respective buttons as seen here:
|
As mentioned by @LukasTy
Without |
We are closing this one in favor of #12691. |
@bruns6077: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to Reproduce
There is no live example available as the issue cannot be replicated in a live environment.
The current limitations significantly hinder the theming process for pickers. Reusing existing themes for tabs and buttons is not feasible, leading to only one alternative:
Apply custom classes to the root element (DesktopPaper or MobilePaper) and override the styles for action buttons and tab styles based on the rootClass. This method is inefficient as it involves duplicating styles due to the inability to modify the color property directly.
Reproduction Steps:
Current Behavior
The
PickersActionBarProps
is currently defined as follows:With actions defined as:
export type PickersActionBarAction = 'clear' | 'cancel' | 'accept' | 'today';
Expected Behavior
PickersActionBarProps
should also accommodateButtonProps
, or at the very least, the color attribute. An improved definition could be:Additionally,
TabProps
should be included inSlotProps
for the DateTimePicker.Context
The current framework does not support styling Picker tabs and button colors (actionBar), posing a challenge for customization.
Your Environment
Not provided.
Search Keywords: timepicker, pickers, datepicker, rangepicker, daterangepicker, colors, props
The text was updated successfully, but these errors were encountered: