diff --git a/src/packages/components/Informations/Inputs/InputsDate/index.vue b/src/packages/components/Informations/Inputs/InputsDate/index.vue index b9e0caa8..8d6ee6bf 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], - [ComponentInteractParamsEnum.DATE_END]: v[1], - [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 ) }