updates date pickers to v9 - #1899
Conversation
✅ Deploy Preview for moped-main-and-prs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
updates from running a codemod script
There was a problem hiding this comment.
i think these extra parentheses will go away after running prettier. could you run that here and in the next file?
but glad the diff surfaced the MUI todo, soon! 🚀
There was a problem hiding this comment.
updates from running a codemod script
There was a problem hiding this comment.
input props are now passed via slotProps rather than at the global level
| import { useMutation } from "@apollo/client"; | ||
| import { format } from "date-fns"; | ||
| import parseISO from "date-fns/parseISO"; | ||
| import { parseISO, format } from "date-fns"; |
There was a problem hiding this comment.
I had to update the date-fns library as our version was not compatible with x-date-pickers v9, and the current version (v4) requires this import convention
| "aws-amplify": "^5.3.33", | ||
| "axios": "^1.16.0", | ||
| "date-fns": "^2.30.0", | ||
| "date-fns": "^4.4.0", |
There was a problem hiding this comment.
current version of date-fns library! skipped a version of this as well but went through the documentation for both upgrades and I believe I have addressed any potential breaking changes.
roseeichelmann
left a comment
There was a problem hiding this comment.
tested all the date pickers and date/time formatting and compared to prod, this looks good to me! i dont mind that you have to click on the calendar now to get the drop down menu
mddilley
left a comment
There was a problem hiding this comment.
Thanks Tillian! I'm only requesting change because there is a little bugginess with focus due to crossover with DataGridPro focus behavior. I found one potential path to a fix, and I'm happy to take a closer look too!
There was a problem hiding this comment.
i think these extra parentheses will go away after running prettier. could you run that here and in the next file?
but glad the diff surfaced the MUI todo, soon! 🚀
| value={value ? parseISO(value) : null} | ||
| onChange={handleChange} | ||
| InputProps={{ style: { minWidth: "100px" } }} | ||
| slotProps={{ |
There was a problem hiding this comment.
I noticed that the date picker isn't working quite like the demo when clicking into the left side of the input, and I think that the way we are managing the tab focus in the Data Grid row is interfering with the ability to immediately enter the date keyboard input. I made a recording because it is hard to put into words.
It seems there is a new fieldRef prop that could be used in place of inputRef that we are currently using.
@tillyw could you test this out?
Here is what I'm seeing where it takes two clicks to enter keyboard entry mode:
Screen.Recording.2026-07-22.at.5.30.09.PM.mov
There was a problem hiding this comment.
thank you for working with me on this! ready for re-review :)
| /> | ||
| ), | ||
| width: 180, | ||
| width: 185, |
There was a problem hiding this comment.
I like 'Target date' and 'Actual date'! Uses slightly different language from the headers for additional context
mddilley
left a comment
There was a problem hiding this comment.
Works amazingly! I noticed that dates can now be entered by keyboard in the component form too! All of the uses of date-fns look consistent with prod to me. Thanks for troubleshooting the small quirks that came out of the upgrade. 🚢 🙏 🚀
johnclary
left a comment
There was a problem hiding this comment.
Looks great and works great 👍 🚢 🚢 🚢 🚢
chiaberry
left a comment
There was a problem hiding this comment.
we have a lot of dates! it looks good and interacting with the picker was smooth.
Approving assuming that you will run prettier on those files to remove the (extra) parens.
|
thanks, y'all! and thank you @chiaberry for the reminder to run prettier on those files! after consulting with @mddilley i'm going to merge this branch so we can compare #1900 to main rather than this branch and have the option to test via the deploy preview |

Associated issues
closes cityofaustin/atd-data-tech#28996
Testing
URL to test:
https://deploy-preview-1899--moped-main-and-prs.netlify.app/
Steps to test:
compare any instances of date pickers and areas where dates/timestamps are displayed (the latter because I had to update the
date-fnslibrary in order to get to the currentx-date-pickersversiondate pickers
timestamps
please let me know if I missed any instances of date pickers!
Ship list
[ ] Product manager added to QA test script if applicable