-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
feat: past and overlapping ooo #17373
base: main
Are you sure you want to change the base?
Conversation
@Amit91848 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (10/28/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (10/28/24)1 label was added to this PR based on Keith Williams's automation. |
|
||
function Calendar({ | ||
className, | ||
classNames, | ||
fromDate, | ||
toDate, | ||
showOutsideDays = true, | ||
disablePastDates = true, |
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.
would prefer this to be a minDate option (set by default to new Date()) - and nullable to allow all dates enabled.
Edit: This can be implemented to a minor tweak to the fromDate instead of introducing a new param.
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.
@@ -21,7 +21,7 @@ function Calendar({ | |||
}: CalendarProps) { | |||
return ( | |||
<DayPicker | |||
fromDate={fromDate || new Date()} | |||
fromDate={fromDate} |
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.
Handled in parent component
@@ -63,7 +64,8 @@ export function DatePickerWithRange({ | |||
sideOffset={4}> | |||
<Calendar | |||
initialFocus | |||
fromDate={minDate} | |||
//When explicitly null, we want past dates to be shown as well, otherwise show only dates passed or from current date |
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.
Added comment because this is confusing
What does this PR do?
Screencast.from.2024-10-28.21-26-38.webm
Mandatory Tasks (DO NOT REMOVE)