Why is there no date range picker component in react similar to the one in HTML ? Now if I have to use any other date range picker then I am not able because the npm package itself is not being installed. Help me out here please !
Hi Aagam,
Date Range Picker solution used in our HTML version requires jQuery and combining jQuery with any of SPA isn't good practice, if you have such a requirement you can add jQuery and reuse our solution from the HTML version.
Alternatively, you can consider using the dependency below:
https://www.npmjs.com/package/react-date-range
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hey Lauris,
I tried installing this npm package already. But it is giving some dependency error.
npm ERR!
npm ERR! While resolving: react-table@7.7.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR! peer react@"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" from @react-aria/ssr@3.2.0
How do I resolve this ?
Hi Aagam,
Unfortunately, we were not able to reproduce this issue in the latest Metornic version.
Could you please specify which Metronic version are you using?
Also if you have modified anything in our codebase please describe those changes.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Lauris I am using 8.1.5 version of metronic and this is the latest one as per changelogs of react.
If i use the --force tag while installing it installs but gives problem as already advised.
Hi,
Also, could you please tell me your npm and node versions?
The command below didn't throw any errors in the latest Metronic version:
npm i react-date-range
npm - 8.19.3v
node - 16.19.0v
react - 18.0.0v
Hi,
Try to do the followings:
Delete node_modules and package-lock.json/yarn.lock.
Try clearing out npm cache npm cache clean --force
Install dependency again with npm i react-date-range
command.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Thanks Lauris. This worked. But this wasn't the optimistic way of doing it is what I think.
Do you have any idea what was the reason behind this ??
Hi,
Most likely this is due to dependency conflicts. We will check this issue in more detail and try to include a fix in the next releases.
Regards,
Lauris Stepanovs,
Keenthemes Support Team