diff --git a/src/components/form-designer/form-widget/field-widget/date-widget.vue b/src/components/form-designer/form-widget/field-widget/date-widget.vue index 0148f77..bb2a79d 100644 --- a/src/components/form-designer/form-widget/field-widget/date-widget.vue +++ b/src/components/form-designer/form-widget/field-widget/date-widget.vue @@ -72,7 +72,7 @@ this.fieldModel = [this.fieldModel] } if (val !== 'dates' && oldVal === 'dates'){ - this.fieldModel = this.fieldModel[0] + this.fieldModel = this.fieldModel ? this.fieldModel[0] : null } }, } diff --git a/src/components/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue b/src/components/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue index b577e0c..d13ffe3 100644 --- a/src/components/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +++ b/src/components/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue @@ -26,7 +26,7 @@ this.optionModel.defaultValue = [this.optionModel.defaultValue] } if (val !== 'dates' && oldVal === 'dates'){ - this.optionModel.defaultValue = this.optionModel.defaultValue[0] + this.optionModel.defaultValue = this.optionModel.defaultValue ? this.optionModel.defaultValue[0] : null } }, }