correct-apricot
correct-apricot•2y ago

Having problem with antd DatePicker

Hi, I'm using antd datePicker in the form. It works fine in create page. But when using it in edit page it returns previous day of my selected date. Is there any solution?
3 Replies
Omer
Omer•2y ago
Hey @Kishore 👋, It's looks like a timezone issue. You can check our DatePicker example https://refine.dev/docs/examples/inputs/datePicker/
Date Picker | refine
While creating a record with refine, you may use the Ant Design Date Picker component directly in your refine project if you need date information. We utilized the Date Picker component to obtain 'Published At' date data while creating a post in this example. You may examine the code below to learn how to use and manage Date Picker Component in ...
correct-apricot
correct-apricot•2y ago
I also think its a timezone problem. But it works fine in create. Problem is only in edit.
Omer
Omer•2y ago
Yes, definitely. It may be because the date from your API has a timezone.