Skip to content
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

react-calendar__tile--active class gets automatically added #938

Closed
2 tasks done
jackvik opened this issue Apr 23, 2024 · 4 comments
Closed
2 tasks done

react-calendar__tile--active class gets automatically added #938

jackvik opened this issue Apr 23, 2024 · 4 comments
Labels
bug Something isn't working stale

Comments

@jackvik
Copy link

jackvik commented Apr 23, 2024

Before you start - checklist

  • I followed instructions in documentation written for my React-Calendar version
  • I have checked if this bug is not already reported

Description

Suppose, I am passing array of dates to the value prop, which have all dates which doesn't include dates that that come on sun or Saturday. For example, dates from 22 to 31st March 2024. But the dates on 23rd and 24th get automatically react-calendar__tile--active and make it look like selected. Although I am managing my own selected class by adding it using tileClassName.

Steps to reproduce

set value prop with dates i mentioned in description

Expected behavior

the dates which are not part of selected dates array shouldn't be having tile--ative class

Actual behavior

react-calendar__tile--active class gets automatically

Additional information

No response

Environment

  • Browser (if applicable):
  • React-Calendar version:
  • React version:
    Version 124.0.6367.60 (Official Build) (arm64)
    react-calendar: 4.8.0
@jackvik jackvik added the bug Something isn't working label Apr 23, 2024
@jackvik
Copy link
Author

jackvik commented Apr 23, 2024

Why your code is adding this
if (isRangeWithinRange(valueRange, dateRange)) { classes.push(${className}--active); } else if (doRangesOverlap(valueRange, dateRange)) { classes.push(${className}--hasActive); }

even if i am using my own Tileclassname and value and onchange? Why code is adding classnames when i don't want them to added?Can we override this?

@jackvik
Copy link
Author

jackvik commented Apr 24, 2024

@wojtekmaj can you please help with this? thanks

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Jul 29, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant