Kiarash-Z/react-modern-calendar-datepicker

Warning: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Opened this issue · 1 comments

Dear Team,

First of all, thank you for the great work, this Calendar Datepicker is beautiful and super useful.

However, I'm getting the below error on the console. Could you please let me know more about this? Will this have an effects on the calendar functionalities or it will work as before?

Are you planning to solve this issue? Also, I would like to offer my assistance if I can help with this.

Thank you.

The error:
Warning: F: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at F (webpack-internal:///(ssr)/./node_modules/@hassanmojab/react-modern-calendar-datepicker/lib/index.js:858:15)

Warning: W: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at W (webpack-internal:///(ssr)/./node_modules/@hassanmojab/react-modern-calendar-datepicker/lib/index.js:681:15)

Warning: B: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
at B (webpack-internal:///(ssr)/./node_modules/@hassanmojab/react-modern-calendar-datepicker/lib/index.js:681:15)

I have updated my forked repository to support React v19.

To resolve this error,
please modify your package.json as follows:

{
  "dependencies": {
    "react-modern-calendar-datepicker": "github:Cow258/react-modern-calendar-datepicker#built"
  }
}

or

npm install --save github:Cow258/react-modern-calendar-datepicker#built
yarn add github:Cow258/react-modern-calendar-datepicker#built
pnpm i github:Cow258/react-modern-calendar-datepicker#built