Is there a way to submit a Timepicker form value as a string?
I am using ant design
TimePicker
component and when I submit the form the submitted data is an dayjs object. I want to submit is as an string format to API. I have tried changing the form data before submitting it using this link https://refine.dev/docs/faq/#how-can-i-change-the-form-data-before-submitting-it-to-the-api as below:
And it is working as expected. But now I have a requirement where I have a dynamic form with multiple nested values that have time in it. So now how can I achieve it for the nested fields. For example my nested field is as:
Here my pickup_points
and drop_points
can have as many data with time in it. Is there a way to submit a form data as a formatted string instead of submitting as dayjs object?FAQ | refine
How can I change the form data before submitting it to the API?
1 Reply
unwilling-turquoiseOP•3y ago
I solved the problem by updating the form data before submitting for nested values as well
But I would like to know if there is a way to submit the form without overriding the submit method.