-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Calendar calendar state context set value can not set null value #6030
Calendar calendar state context set value can not set null value #6030
Conversation
5d7b5ba
to
36f024a
Compare
36f024a
to
6e4d36b
Compare
…ot-set-null-value
GET_BUILD |
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'any' } @react-stately/calendarCalendarState CalendarState {
focusNextDay: () => void
focusNextPage: () => void
focusNextRow: () => void
focusNextSection: (boolean) => void
focusPreviousDay: () => void
focusPreviousPage: () => void
focusPreviousRow: () => void
focusPreviousSection: (boolean) => void
focusSectionEnd: () => void
focusSectionStart: () => void
focusedDate: CalendarDate
getDatesInWeek: (number, CalendarDate) => Array<CalendarDate | null>
isCellDisabled: (CalendarDate) => boolean
isCellFocused: (CalendarDate) => boolean
isCellUnavailable: (CalendarDate) => boolean
isDisabled: boolean
isFocused: boolean
isInvalid: (CalendarDate) => boolean
isNextVisibleRangeInvalid: () => boolean
isPreviousVisibleRangeInvalid: () => boolean
isReadOnly: boolean
isSelected: (CalendarDate) => boolean
isValueInvalid: boolean
maxValue?: DateValue
minValue?: DateValue
selectDate: (CalendarDate) => void
selectFocusedDate: () => void
setFocused: (boolean) => void
setFocusedDate: (CalendarDate) => void
- setValue: (CalendarDate) => void
+ setValue: (CalendarDate | null) => void
timeZone: string
- value: CalendarDate
+ value: CalendarDate | null
visibleRange: RangeValue<CalendarDate>
} |
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.
LGTM, thanks for the PR!
Looks really good, just a couple small things and then I think it's good to go :) |
@LFDanLu, Hello! Has everything stopped here? :( |
hey @psywalker |
…ot-set-null-value
Can we also add this to the date range picker? |
@andredewaard mind expanding a bit on the ask here? DateRangePicker should already support something like this via its own context: https://react-spectrum.adobe.com/react-aria/DateRangePicker.html#state |
Closes #6006
✅ Pull Request Checklist:
📝 Test Instructions:
Monosnap.screencast.2024-03-09.15-39-42.mp4