-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add date offset functionality to DateRangePicker #1252
Add date offset functionality to DateRangePicker #1252
Conversation
Merge please 馃檹 |
bb42bfa
to
ca84fb0
Compare
Thanks for the review @ljharb, I've updated this PR to align with master and actioned your requests. If you see anything else you think needs an update please let me know. |
Is this still up? i have same problem/request #1062 |
Hey @majapw, there seems to be some interest in this. If you're able to review the changes I'm happy to continue supporting this to get it merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me. I have one quick q about that added code to the DayPickerRangeController
@@ -483,6 +483,10 @@ export default class DayPickerRangeController extends BaseClass { | |||
startDate = getSelectedDateOffset(startDateOffset, day); | |||
endDate = getSelectedDateOffset(endDateOffset, day); | |||
|
|||
if (this.isBlocked(startDate) || this.isBlocked(endDate)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this behavior broken before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was, I noticed it in making these updates.
Happy to merge it after the conflict is resolved @jakeclements Man, this really dropped off my radar. Super sorry! :) Would have merged earlier if I had realized it was such a quick change. 馃檴 |
ca84fb0
to
2355698
Compare
As requested in #1062, this PR passes date offset functionality up to the DateRangePicker.
Tests for date offsets are already included within the DayPickerRangeController spec.
If tests are required for the additional functionality this adds to the DateRangePicker please point me to the spec and I'll add them, an appropriate file to add these wasn't clear to me. 馃槄
I'm happy to discuss the inclusion of this PR.