我有以下react-hook-form
组件并使用react-datetime
组件。该值是一个矩对象。我想要一个iso格式的字符串,例如:2021-11-03T18:30:00.000Z
<Controller
name="resetDateTime"
control={control}
required
rules={{
required: {
value: true,
message: "Please provide reset Datetime",
},
}}
render={({ field }) => (
<Datetime
{...field}
inputProps={{
placeholder: "MM-DD-YYYY HH:mm",
}}
viewMode="time"
/>
)}
/>