help with date field
Sorry for my bad english, I'm still a begginer in react, I follow this tutorial tu create a dashboard https://youtu.be/k4lHXIzCEkM I modify this to create my own version to include a transactions pages, but I'm facing an issue, when i try to send a new transactions from the create transaction page is not working. I'm doing the exact same things as the properties form. The error I'm getting is Cannot read properties of undefined (reading 'name'), And is not even send the request. (I added the necessary code to the backend ).
this is the code of my form where I include the date field: https://gist.github.com/itgeeky/be8e50184e808c729cb260a1fe87df10
I appreciate your help!
JavaScript Mastery
YouTube
Build and Deploy a Full Stack MERN Application With CRUD, Auth, and...
In this one video, learn how to develop a fully functional full-stack MERN dashboard application with complete CRUD functionalities, authentication, pagination, sorting, filtering, and more!
ā refine - https://github.com/refinedev/refine
āš» GitHub Code Client - https://github.com/refinedev/refine/tree/next/examples/mern-dashboard-client
āš» GitH...
5 Replies
Hi @geekyland. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Sorry @geekyland, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
xenophobic-harlequinā¢2y ago
@geekyland sorry for late response. I'm debugging right now
yes JSM uses register and working as expected but i found couple of issues on web. and react-hook-form recoomends to use controller instead of register
https://react-hook-form.com/get-started/ Integrating with UI libraries section shows this example. and in our examples we used <Controller>.
can you change
register
to Controller
and try again please ?
i'm not exactly sure whats going on but react hook form recommends thisabsent-sapphireā¢2y ago
I manage to make it work just with register, but I'm not able to modify the date, I just send the current date to my backend. I try to use Controller but in "@refinedev/react-hook-form" there is not a Controller export, do I need to install react-hook-form again ?
xenophobic-harlequinā¢2y ago
yes Controller should import from react-hook-form
absent-sapphireā¢2y ago
Ok, I'll try, thanks