Open folivieri opened 1 year ago
Hi @folivieri Thanks for using this component.
I wonder what have you used as cronMessages
object. Because it is complaining about a missing id
If you are not going to use a custom localization just remove the prop messages
and it will use the default configuration like this
<IntlProvider locale="en" defaultLocale="en">
<Cron onChange="{handleOnChange}" showResultText showResultCron />
</IntlProvider>
I would recommend also to run storybook, yarn sb
and there you are going to find the examples.
Finally if you need a custom message dictionary take this as an example
https://github.com/aepel/react-gnu-cron/blob/master/src/component/Cron/components/cronMessages.js
Let me know if you will able to solve it.
Thanks for the quick response. That did not help. nor did the suggestions by the browser : utils.js:76 Uncaught Error: [@formatjs/intl] An
id` must be provided to format a message. You can either:
eslint
config to include eslint-plugin-formatjs
to autofix this issue`See example: in CodeSandbox: https://codesandbox.io/s/misty-cache-bnj0mx?file=/src/App.js
Any Thoughts?
Tried import:
import { IntlProvider } from 'react-intl'
import Cron from 'react-gnu-cron';
and
<IntlProvider messages="{cronMessages}" locale="en" defaultLocale="en">
<Cron onChange="{handleOnChange}" showResultText showResultCron />
</IntlProvider>
Browser complains: