#4112·date-fns

"preprocessor" undefined

Author: Vishwas-93Created Dec 1, 2025Updated Sep 11, 2026

Hello,

I am currently using MUI Desktop date picker with date-fns adapter and running into a crash only when React App is accessed in Germany. The locale is correctly set in other places.

I looked into the code and we might need a optional chaining in the format function "?" just to avoid the crash caused by the "preprocessor" undefined.

// invoke localize preprocessor (only for french locales at the moment) if (locale.localize?.preprocessor) { parts = locale.localize.preprocessor(originalDate, parts); }

Attaching screenshot for reference.

Any help or workaround would be greatly appreciated.

Regards Vishwas

Image