-
Notifications
You must be signed in to change notification settings - Fork 40
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
Range DatePicker
's startDate
& endDate
props allow undefined
#2334
Merged
r100-stack
merged 8 commits into
main
from
r/range-date-picker-undefined-start-end-date
Nov 13, 2024
Merged
Range DatePicker
's startDate
& endDate
props allow undefined
#2334
r100-stack
merged 8 commits into
main
from
r/range-date-picker-undefined-start-end-date
Nov 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r100-stack
requested review from
mayank99 and
smmr-dn
and removed request for
a team
November 8, 2024 18:15
smmr-dn
approved these changes
Nov 8, 2024
mayank99
reviewed
Nov 8, 2024
mayank99
approved these changes
Nov 8, 2024
smmr-dn
approved these changes
Nov 8, 2024
mayank99
approved these changes
Nov 11, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Fixes #2333. Range
DatePicker
'sstartDate
andendDate
props allowundefined
or not passing any value. Additionally, either both have to be passed or neither have to be passed. Passing just one of those two props is not allowed.But as @mayank99 mentioned, we still recommend users to have two separate
DatePicker
s instead of a rangeDatePicker
. Similar: #1297 (comment).After this change, I noticed that if a user passes one of the two, it could lead to some unexpected behavior. E.g. just passingstartDate
but noendDate
may cause some unexpected issues:Demo of the unexpected issues
Demo.mov
I'm not sure if this behavior is expected. Experimenting with other changes to see how to not get these unexpected changes. Making this PR ready to review before I finish my experimentation to get some more thoughts on this behavior and because it's a small PR.Solved after #2334 (comment)Testing
startDate
orendDate
is passed.Testing code based on the user's example
Docs
Added changeset