-
Notifications
You must be signed in to change notification settings - Fork 10
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
refactor: π‘ Migrate DatePicker to MUI5 #747
refactor: π‘ Migrate DatePicker to MUI5 #747
Conversation
const dateOptions = within(calendarDialog).getAllByRole('cell'); | ||
const selectedDate = dateOptions[0]; | ||
const dateOptions = within(calendarDialog).getAllByRole('button'); | ||
const selectedDate = dateOptions[4]; |
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.
I had issues with this story not passing for me. We needed to actually get all of the buttons within the calendarDialog
instead of the cells. Not sure if this a different in the new DatePicker
markup or what. The 1st of the month corresponds to the fifth button inside the calendarDialog
. A bit hacky, but the best I could figure out. I can revisit if needed, but don't think that it is very likely we would be adding/removing buttons that would cause this hard-coded value not to work.
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.
I think this will work for now. I already have a line item to go update the tests for this component once we upgrade to version 5.
See Issue #358
Note: This PR also migrates the |
SQFormDatePicker
: https://www.loom.com/share/f5758d90e3104eaeac4a1e1f895e2c2fSQFormDatePickerWithDateFNS
: https://www.loom.com/share/147125be9eba44ccb80ea057a08c6853β Closes: #745 #748