Skip to content
Discussion options

You must be logged in to vote

Hi, I also faced, I resolved it by following these steps:

Remove assign_date from Sequelize schema. Validate it as required in the Flutter form.
Format date in backend: After receiving the date, format it in the backend before insertion using below code snippet:

const assignDate = new Date(req.body.assign_date); 
const formattedDate = assignDate.toISOString().split('T')[0];

const assignData = {
   assign_date: formattedDate,
}

Then Save.
I believe it will work.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@DilharaSannasgala
Comment options

DilharaSannasgala Mar 31, 2024
Collaborator Author

@sasankadeshapriya
Comment options

@DilharaSannasgala
Comment options

DilharaSannasgala Mar 31, 2024
Collaborator Author

Answer selected by DilharaSannasgala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants