scheduledAtをISO8601で指定できるように
Signed-off-by: mattyatea <mattyacocacora0@gmail.com>
This commit is contained in:
parent
271c872c97
commit
380c8c3283
|
@ -202,7 +202,7 @@ export const paramDef = {
|
|||
type: 'object',
|
||||
nullable: true,
|
||||
properties: {
|
||||
scheduledAt: { type: 'integer', nullable: false },
|
||||
scheduledAt: { type: 'string', nullable: false },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -775,10 +775,6 @@ async function post(ev?: MouseEvent) {
|
|||
}
|
||||
}
|
||||
|
||||
if (postData.schedule?.scheduledAt && typeof postData.schedule.scheduledAt === 'string') {
|
||||
postData.schedule.scheduledAt = parseInt(postData.schedule.scheduledAt);
|
||||
}
|
||||
|
||||
let token = undefined;
|
||||
|
||||
if (postAccount) {
|
||||
|
|
|
@ -43,12 +43,12 @@ if ( props.modelValue && props.modelValue.scheduledAt) {
|
|||
|
||||
function get() {
|
||||
const calcAt = () => {
|
||||
return new Date(`${atDate.value} ${atTime.value}`).getTime();
|
||||
return new Date(`${atDate.value}T${atTime.value}`).toISOString();
|
||||
};
|
||||
|
||||
return {
|
||||
...(
|
||||
props.modelValue ? { scheduledAt: calcAt() } : {}
|
||||
props.modelValue ? { scheduledAt: calcAt() } : ''
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue