OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Preserve the datepicker value when re-opening the single datepicker
Dombi Attilaba1afb75b463
diff --git a/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.ts b/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.tsindex 39556e977f2..d9ae4d677cb 100644--- a/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.ts+++ b/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.ts@@ -224,11 +224,9 @@ export class OpSingleDatePickerComponent implements ControlValueAccessor, AfterCprivate initializeDatepicker() {this.datePickerInstance?.destroy();- if (!this.value) {- // Set the initial date to today, if no value is provided.- const today = parseDate(new Date()) as Date;- this.writeWorkingValue(this.timezoneService.formattedISODate(today));- }+ // Initialize the working values.+ const initialDate = parseDate(this.value || new Date()) as Date;+ this.writeWorkingValue(this.timezoneService.formattedISODate(initialDate));this.datePickerInstance = new DatePicker(this.injector,