[BUG] Error while using DatePicker on edit forms.
See original GitHub issueDescribe the bug Error while using DatePicker on edit forms. Seems like there is something going wrong with dayjs and antd’s DatePicker which is default for refine.
dayjs.js:151
Uncaught TypeError: date.locale is not a function
at Object.format (dayjs.js:151)
at formatValue (dateUtil.js:126)
at useValueTexts.js:19
at useMemo (useMemo.js:6)
at useValueTexts (useValueTexts.js:8)
at InnerPicker (Picker.js:135)
at renderWithHooks (react-dom.development.js:14985)
To Reproduce Steps to reproduce the behavior:
- Add a new DatePicker to the edit form.
- Nagivate to the edit page.
- See error on the browser’s console.
Expected behavior No error.
Screenshots
Desktop (please complete the following information):
- OS: MacOS Monterey
- Browser [Brawe]
- Version 1.31.91 Chromium: 95.0.4638.69
- Used dataProvider [custom]
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Use of DatePicker in an edit form · Issue #371 - GitHub
Trying to implement DatePicker into my react application. While creating an object I have no problem at all. If I select a date...
Read more >Trouble with using datepicker in edit form - django
I have trouble with edit data in django project. Everything is almost ok :) , but if I'm trying edit data my form...
Read more >Can't use datepicker in form - Power Platform Community
Solved: I am trying to use a datepicker in my edit form, but I can't seem to get it to work. I can't...
Read more >Error changing the year in the date picker - Anvil Works
Click on a date picker, change the year and click on apply. The year on the widget does not change.
Read more >Required date field still shows error after using calendar picker
Hello,If you submit a form with a date that's required, you'll get an error as expected. If, after an error appears, you use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just tested it out on release 2.2.3 through yarn and it worked
@omeraplak Thanks. It worked.
npm
insted ofyarn
.refine
using fordayjs
. It is currently1.10.5
getValueProps
. Check it out the edit page on the example of datepicker.