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

How disable auto set activeStartDate after click on day in next month with double view? #367

Closed
ilyanikulin opened this issue Apr 29, 2020 · 8 comments
Assignees
Labels
enhancement New feature or request stale

Comments

@ilyanikulin
Copy link

No description provided.

@ilyanikulin
Copy link
Author

ilyanikulin commented Apr 29, 2020

There aren't comfortable when change month range after click...

@ilyanikulin ilyanikulin changed the title How disable auto set activeStartDate after click on day in next month with double view? How disable auto set activeStartDate after click on day in next month with double view? May 6, 2020
@wojtekmaj
Copy link
Owner

In React-Calendar 3.0, unlike in 2.x, activeStartDate is a fully controlled prop. You can choose to ignore onActiveStartDateChange call.

@wojtekmaj wojtekmaj self-assigned this May 11, 2020
@wojtekmaj wojtekmaj added the question Further information is requested label May 11, 2020
@betCG
Copy link

betCG commented May 13, 2020

In React-Calendar 3.0, unlike in 2.x, activeStartDate is a fully controlled prop. You can choose to ignore onActiveStartDateChange call.

How can i do that? I'm learning react so i'm kinda a newbie in web programming

@wojtekmaj
Copy link
Owner

You have two options: use React-Calendar as an uncontrolled component, or a controlled one.

Uncontrolled: use defaultValue, optionally defaultActiveStartDate. You don't wanna do this.

Controlled: use value, optionally activeStartDate, and onChange, onActiveStartDateChange to control the change. In onActiveStartDateChange, change activeStartDate prop only when you want it to be changed.

However, I don't know if you'll have all the information you need to implement this. If you come up with something and you will need more information from any callback, just let me know and I'll add it.

@mriot
Copy link

mriot commented Oct 26, 2020

I have noticed, that when you click on a day of another month while being in month view, onClickDay as well as onActiveStartDateChange will fire.
In onActiveStartDateChange however, I don't see a way how to differentiate arrow navigation and a click on another months day.

Maybe a dedicated onArrowClick (or something) could be a solution.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2021

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 Nov 1, 2021
@github-actions
Copy link
Contributor

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

@wojtekmaj
Copy link
Owner

in v3.5.0, action was added to onActiveStartDateChange and other callbacks. See #474 for more details.

@wojtekmaj wojtekmaj added enhancement New feature or request and removed question Further information is requested labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

4 participants