Calendar: disable date selected Highligth #52632
Replies: 1 comment
-
|
To prevent a cell item in the Ant Design calendar from being highlighted when selected, without overriding
Here's a basic example of how you might achieve this with CSS: /* Override the selected date style */
.ant-picker-cell-selected .ant-picker-cell-inner {
background-color: transparent !important;
color: inherit !important;
}
/* Override the selected month name style */
.ant-picker-header-view .ant-picker-cell-selected {
background-color: transparent !important;
color: inherit !important;
}This CSS will make the selected date and month name appear as if they are not highlighted by setting their background and text color to be transparent or inherit from the parent. Please note that these class names ( If this solution doesn't fully meet your needs or if you have further questions, feel free to ask! 🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I would like to know if there is any option do prevent a cell item in the calendar to be highlighted when selected ?
I am aware of the
itemActiveBgdesign token. As a workaround, I can make the itemActive bg the same color as my general background (white) but the current selected day number (or month name) in the cell header still highlighted in blue.Is it possible to not have this behavior without overriding
fullCellRenderorheaderRender?Beta Was this translation helpful? Give feedback.
All reactions