Page crash with Luxon and clearable picker
See original GitHub issueEnvironment
Tech | Version |
---|---|
material-ui-pickers | 2.1.1 |
material-ui | 3.9.0 |
React | 16.7 |
Browser | Chrome 70 |
Peer library | Luxon 1.10.0 |
Steps to reproduce
- Create a clearable picker w/ default value of
null
- Attempt to change the value
Expected behavior
The new date is stored, and is not null.
Actual behavior
A page crash:
index.esm.js:50 Uncaught TypeError: Cannot read property 'equals' of null
at LuxonUtils../node_modules/@date-io/luxon/build/index.esm.js.LuxonUtils.isEqual (index.esm.js:50)
at DateTextField.componentDidUpdate (material-ui-pickers.esm.js:465)
at commitLifeCycles (react-dom.development.js:15976)
at commitAllLifeCycles (react-dom.development.js:17262)
at HTMLUnknownElement.callCallback (react-dom.development.js:149)
at Object.invokeGuardedCallbackDev (react-dom.development.js:199)
at invokeGuardedCallback (react-dom.development.js:256)
at commitRoot (react-dom.development.js:17458)
at completeRoot (react-dom.development.js:18912)
at performWorkOnRoot (react-dom.development.js:18841)
Live example
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Page crash with Luxon and clearable picker · Issue #870
The new date is stored, and is not null. Actual behavior. A page crash: index.esm.js:50 Uncaught TypeError: Cannot read property 'equals' of ...
Read more >Developers - Page crash with Luxon and clearable picker -
Coming soon: A brand new website interface for an even better experience!
Read more >React Hook Form + Material UI Datepickers and Luxon ...
Basically, I want to take the value of my outputted DatePicker and TimePicker and format it correctly to send to the backend. I...
Read more >rc-time-picker-luxon
Name Type Default
prefixCls String 'rc‑time‑picker'
clearText String 'clear'
disabled Boolean false
Read more >How to Handle Time Zones using DateTime and Luxon
Raise your hand if you've ever had issues dealing with time zones, or even if you've asked, "How do I convert a Date...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dmtrKovalenko actually i think this has to be reopened, the pr i provided only fixed the date clearing, but there seem to be another issues with luxon (setting an initial date)
bump, same thing happening for me with an initial value of
null
: