Search code examples
javascriptreactjsreduxredux-formreact-widgets

redux-form + react-widgets DateTimePicker


i'm working on reactjs with redux im trying to implement the following form in the link https://redux-form.com/7.4.2/examples/react-widgets/

all components working fine except DateTimePicker because of (momentLocaliser) i tried to implement it in this way :

import 'react-widgets/dist/css/react-widgets.css'
import moment from 'moment'
import momentLocaliser from 'react-widgets/lib/localizers/moment'
momentLocaliser(moment)

the main issue of implementing momentLocaliser getting (Module not found)

please i need to fix it or if there any date picker i may use with redux-form


Solution

  • can you try this

    npm i react-widgets-moment should be work
    
    
    import moment from  'moment';
    import momentLocalizer from 'react-widgets-moment'
    momentLocalizer()