diff --git a/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue b/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue index 3825dbdbf..ce37eb686 100644 --- a/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue +++ b/app/javascript/vue/repository_item_sidebar/repository_values/date_time_component.vue @@ -137,9 +137,11 @@ export default { validateValue() { this.error = null; // Date is not changed - if (this.trimSecondsAndMilliseconds(this.defaultStartDate) === this.trimSecondsAndMilliseconds(this.startDate) - && this.trimSecondsAndMilliseconds(this.defaultEndDate) === this.trimSecondsAndMilliseconds(this.endDate)) { - return false; + if (this.defaultStartDate && this.defaultEndDate) { + if (this.trimSecondsAndMilliseconds(this.defaultStartDate) === this.trimSecondsAndMilliseconds(this.startDate) + && this.trimSecondsAndMilliseconds(this.defaultEndDate) === this.trimSecondsAndMilliseconds(this.endDate)) { + return false; + } } if (this.range) {