the frontend uses the same Form, newly added data edited and added in a page of vue+elementUI, to successfully reach the backend. Because the data of the wrong type is returned from the backend API when modified, the time error will be sent to the backend after clicking Save during the modification time. The Date field of the backend cannot receive the value error. Is there a solution?
< H2 > Code < / H2 >front end
<el-form-item label="" prop="startTime">
<el-date-picker v-model="form.record.startTime" @change="setDate" type="date" value-format="yyyy-MM-dd" placeholder=""/>
</el-form-item>
<el-form-item label="" prop="endTime">
<el-date-picker v-model="form.record.endTime" @change="setDate" type="date" value-format="yyyy-MM-dd" placeholder=""/>
</el-form-item>
backend
@NotNull
private Date startTime;
@NotNull
private Date endTime;
I hope you Daniel can give me some ideas. Thank you very much. Thank you