arqex / react-datetime

A lightweight but complete datetime picker react component.
2k stars 870 forks source link

Module not found: Error: Can't resolve 'moment' in 'node_modules/react-datetime/dist' #873

Open diennn-gg opened 2 weeks ago

diennn-gg commented 2 weeks ago

I'm encountering the following error while using react-datetime: Module not found: Error: Can't resolve 'moment' in 'node_modules/react-datetime/dist' However, I don't want to install moment in my project. Is there a way to use react-datetime without needing moment as a dependency?

Could you provide guidance on how to resolve this issue or suggest alternatives to avoid installing moment?

Thanks in advance!

noxxxxxxxx commented 2 weeks ago

@diennn-gg try rc-calendar-picker, use dayjs as dependency, same api with this repo

https://github.com/noxxxxxxxx/react-calendar