jquense / react-big-calendar

gcal/outlook like calendar component
http://jquense.github.io/react-big-calendar/examples/index.html
MIT License
7.88k stars 2.23k forks source link

Button Issue. #2404

Closed vivpan24 closed 1 year ago

vivpan24 commented 1 year ago

Check that this is really a bug

Reproduction link

https://jquense.github.io/react-big-calendar/examples/index.html?path=/docs/props--drilldown-view

Bug description

Hi Community, On clicking the Month, Week, Day, Agenda buttons the rbc-active class is applied to the clicked buttons and the button remains hightlighted. But on clicking Today, Back, Next the button gets hightlighted but when we click outside the button the style gets lost. How can we achieve the same style behaviour for TODAY,NEXT,BACK as it is going for MONTH,WEEK,DAY,AGENDA.

Expected Behavior

No response

Actual Behavior

No response

react-big-calendar version

1.5.2

React version

16.9.0

Platform/Target and Browser Versions

113.0.5672.127 (Official Build) (64-bit)

Validations

Would you like to open a PR for this bug?

7assenTlili commented 1 year ago

@vivpan24 It doesn't look like a bug to me. This is how it is implemented, the TODAY, NEXT and PREVIOUS button do not have an "active" class, only :focus and :hover styles. You can achieve your desired outcome by using a custom toolbar component with a state that tracks the active button.