diff --git a/src/packages/components/Informations/Inputs/InputsDate/index.vue b/src/packages/components/Informations/Inputs/InputsDate/index.vue index 2fa35a75..3800590f 100644 --- a/src/packages/components/Informations/Inputs/InputsDate/index.vue +++ b/src/packages/components/Informations/Inputs/InputsDate/index.vue @@ -39,9 +39,9 @@ const onChange = (v: number | number[]) => { props.chartConfig, useChartEditStore, { - [ComponentInteractParamsEnum.DATE_START]: v[0] | dayjs().valueOf(), - [ComponentInteractParamsEnum.DATE_END]: v[1] | dayjs().valueOf(), - [ComponentInteractParamsEnum.DATE_RANGE]: `${v[0]}-${v[1]}` + [ComponentInteractParamsEnum.DATE_START]: v[0] || dayjs().valueOf(), + [ComponentInteractParamsEnum.DATE_END]: v[1] || dayjs().valueOf(), + [ComponentInteractParamsEnum.DATE_RANGE]: `${v[0] || dayjs().valueOf()}-${v[1] || dayjs().valueOf()}` }, InteractEventOn.CHANGE ) @@ -50,7 +50,7 @@ const onChange = (v: number | number[]) => { useChartInteract( props.chartConfig, useChartEditStore, - { [ComponentInteractParamsEnum.DATE]: v }, + { [ComponentInteractParamsEnum.DATE]: v || dayjs().valueOf() }, InteractEventOn.CHANGE ) }