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 e...

问题:

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


回答1:

can you try this

npm i react-widgets-moment should be work


import moment from  'moment';
import momentLocalizer from 'react-widgets-moment'
momentLocalizer()
  • 发表于 2019-02-22 05:28
  • 阅读 ( 166 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除