-
-
Notifications
You must be signed in to change notification settings - Fork 515
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
Changing activeStartDate does not change calendar view #43
Comments
Hello @mantovanig, What do you think about this approach? Is it something you wouldn'y expect? If so, we'll think of some solution! |
Hello @wojtekmaj , I don't think I understood the approach. Take a look this little example: At start you can navigate with "prev/next" button, but if you select a day, you are no longer able to navigate because the activeStartDate prop has lost priority and I can't change the value only to navigation purpose. I would like to get the browsing behavior of the demo: Thanks in advance |
Hey there, Hope you're not in a hurry with this, and if you are, for now you can get the necessary version from the branch on GitHub instead of npm. |
Hi @wojtekmaj , ok perfect! Thanks |
@mantovanig I think I have the same problem. Could you explain how to change the I tried: But then I get this error: my UPDATE: |
This is what I've done:
And in my package json I put directly the commit of my fork:
If you want you can use the same. Waiting for 3.0 💪 Cheers |
@mantovanig do you use it to pick a range, or a single value? |
Single value. At the moment I don't use it to pick a range. |
potentially fixes wojtekmaj#43
@balazsorban44 just tested your commit and this does fix an issue with activeStartDate not being prioritized over value. Seems like a bug fix to me that doesn't need to wait till 3.0? |
That's not a bug, it's just a design approach that, if we decide to change it, has to wait for next major version to be included, if included at all. Say you have a hotel booking page with this calendar to choose a date of your stay. You'll want the calendar to display the given value and if value is not yet given - display next month. You'd code it like so: <Calendar
value={value} // can be null if not set
activeStartDate={nextMonth} // fallback if value not set
/> How are you supposed to do that with activeStartDate taking priority over value? That's my main concern and the reason I'm postponing this change. |
When i select a range, calendar select tileDisabled days too. And if i do a async request (GET of available days in thath month) in onActiveDateChange function, calendar view dont update. |
Seems a bit silly that once you've chosen a date, you can no longer use the navigation, no? I also have this issue and frankly it just seems crazy. If someone chooses a date and then changes their mind... then what? |
Hello @wojtekmaj , Navigation is doesn't work... I hope you solve this problem soon. |
You're being heard. React-Calendar's current architecture doesn't allow an easy way around this, but it's on our roadmap for 3.0 - follow #216 for updates. |
Resolved in #217, scheduled for 3.0 as planned. |
Hey @wojtekmaj, I can't set an activeStartDate currently, I am passing a value of What am I doing wrong? |
You shouldn't use values that are not beginning of months/years/decades/centuries (depending on the view) for activeStartDate. |
Hi,
I'm trying to use the library with a custom external navigation.
So on click on next/prev of my custom navigation I update the prop "activeStartDate" but the calendar not change.
I saw that the "activeStartDate" in the state of Calendar component is not updated by props.
The text was updated successfully, but these errors were encountered: