Skip to content
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

KeyboardDatePicker produces "React is not defined" error when you try to open the popup. #27473

Closed
2 tasks done
callmeberzerker opened this issue Jul 27, 2021 · 4 comments
Closed
2 tasks done
Labels
component: pickers This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information

Comments

@callmeberzerker
Copy link
Contributor

callmeberzerker commented Jul 27, 2021

So since React introduced new JSX runtime link here and it seems to be causing issues with the KeyboardDatePicker component (at the very least, didn't check the other *Time components)

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

As soon as you click on the icon to open the DatePicker the whole page (no ErrorBoundary)

dev-console.ts:13 ReferenceError: React is not defined
    at t.value (Calendar-11ae61f6.js:566)
    at Fs (react-dom.production.min.js:187)
    at Is (react-dom.production.min.js:186)
    at zl (react-dom.production.min.js:269)
    at ku (react-dom.production.min.js:250)
    at xu (react-dom.production.min.js:250)
    at bu (react-dom.production.min.js:250)
    at fu (react-dom.production.min.js:243)
    at react-dom.production.min.js:123
    at e.unstable_runWithPriority (scheduler.production.min.js:18)

The Calendar-hash.js is the one from @material/ui/pickers/esm/Calendar

Expected Behavior 🤔

The React JSX transform should be supported.

Steps to Reproduce 🕹

I will try to cobble a sample reproduction later on.

Steps:

Context 🔦

Your Environment 🌎

System:
    OS: macOS 11.4
  Binaries:
    Node: 15.12.0 - ~/.nvm/versions/node/v15.12.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v15.12.0/bin/yarn
    npm: 7.6.3 - ~/.nvm/versions/node/v15.12.0/bin/npm
  Browsers:
    Chrome: 92.0.4515.107
    Edge: 92.0.902.55
    Firefox: 90.0.2
    Safari: 14.1.1
  npmPackages:
    @material-ui/core: ^4.12.2 => 4.12.2 
    @material-ui/icons: ^4.11.2 => 4.11.2 
    @material-ui/lab: ^4.0.0-alpha.60 => 4.0.0-alpha.60 
    @material-ui/pickers: ^3.3.10 => 3.3.10 
    @material-ui/styles:  4.11.4 
    @material-ui/system:  4.12.1 
    @material-ui/types:  5.1.0 
    @material-ui/utils:  4.11.2 
    @types/react: ^17.0.15 => 17.0.15 
    react: ^17.0.0 => 17.0.2 
    react-dom: ^17.0.0 => 17.0.2 
    styled-components: ^5.3.0 => 5.3.0 
    typescript: ^4.3.5 => 4.3.5 
`npx @material-ui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/envinfo` goes here.
@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 27, 2021

@callmeberzerker We don't support @material-ui/pickers, please upgrade to the latest version (v5). If you have a reproduction with it, we can have a look.

@oliviertassinari oliviertassinari added component: pickers This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 27, 2021
@callmeberzerker
Copy link
Contributor Author

callmeberzerker commented Jul 27, 2021

Hi @oliviertassinari will try to update to it thanks. Since my team bought the @material-ui pro licenses recently (for the XGrid) hopefully everything is "Okayish" on that front as well even though it's beta?

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 27, 2021

@callmeberzerker It should be OK yes.

@callmeberzerker
Copy link
Contributor Author

Happy to report there is no such issue with the v5 DatePicker. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

2 participants