Im upgrading my system from React 15.4 to React 17.0.2
Im having an issue with React-Widgets
Warning: Failed prop type: [React Widgets] You are attempting to use a widget that requires localization (Calendar, DateTimePicker, NumberPicker). However there is no localizer set. Please configure a localizer.
So im not sure how to handle this.
I installed the following for this.
"moment": "^2.29.1",
"react-widgets": "^4.6.1",
"react-widgets-moment": "^5.0.11",
"react-widgets-moment-localizer": "^1.0.2",
When I start the program I am met with the error above. This is the attempt to set the localizer.
import MomentLocalizer from "react-widgets-moment-localizer";
import dateHandler, {parseDate} from './dateHandler'
import {DateTimePicker, SelectList, DropdownList} from 'react-widgets';
// moment.locale('en');
// MomentLocalizer(moment);
moment.locale('en')
const localizer = new MomentLocalizer(moment)
But results in the error mentioned. I also looked at the documentation (http://jquense.github.io/react-widgets/docs/localization) But obviously failed to get it going.
Any help would be appreciated.