react-nice-dates
react-nice-dates copied to clipboard
Support react 17
Added support for react 17 as peer dependency.
Hey just wondering what this PR is waiting for? Thanks
Hey just wondering what this PR is waiting for? Thanks
It looks like this repo is not active currently. As a workaround you can install this patched version.
Hey @AXeL-dev, i tried installing the patched version and it gives me this error :@axel-dev/react-nice-dates.d.ts is not a module
.
Hey @AXeL-dev, i tried installing the patched version and it gives me this error :@axel-dev/react-nice-dates.d.ts is not a module
.
Did you keep both modules? 'cause i see in the bottom an import line with react-nice-dates/build/style.css. You should uninstall the react-nice-dates module & replace the css import with import '@axel-dev/react-nice-dates/build/style.css'. if it still doesn't work, try to reinstall the module (patched version) from npm.
I have the same problem than @ZilRahman :(
I have this issue /node_modules/@axel-dev/react-nice-dates/index.d.ts' is not a module when I import like this import { DateRangePickerCalendar, DateRangePickerCalendarProps, DateChangeCallBack, } from '@axel-dev/react-nice-dates';
I uninstall react-nice-dates
I have the same problem than @ZilRahman :(
I have this issue
/node_modules/@axel-dev/react-nice-dates/index.d.ts' is not a modulewhen I import like thisimport { DateRangePickerCalendar, DateRangePickerCalendarProps, DateChangeCallBack, } from '@axel-dev/react-nice-dates';I uninstall
react-nice-dates
You're getting this error because the library is written in javascript & you're using it on a typescript project, the best solution would be to install a types declarations module (something like @types/@axel-dev/react-nice-dates), but i don't really have enough time to create that module & publish it, so for now here is a quick solution:
- Create a file in the root of your project & name it
declarations.d.ts. - Open that file & paste the following line into it (don't forget to save):
declare module '@axel-dev/react-nice-dates';
- Go to your
tsconfig.jsonfile & add the file that we just created to theincludeentry:
{
...,
"include": [
...,
+ "declarations.d.ts"
]
}
Your error should be fixed after that.
@danieltoro, the types declarations issue was fixed in version 3.1.2. Simply update the library using:
npm i @axel-dev/react-nice-dates@latest