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
Fix meetings form layout, initialize the single datepicker with today if no value is provided
Dombi Attila083ba3423828
diff --git a/app/views/versions/_form.html.erb b/app/views/versions/_form.html.erbindex 1d95890a388..baefea364fd 100644--- a/app/views/versions/_form.html.erb+++ b/app/views/versions/_form.html.erb@@ -58,23 +58,11 @@ See COPYRIGHT and LICENSE files for more details.</div><div class="form--field">- <label- class="form--label"- for="version_start_date"- ><%= t(:start_date) %></label>- <div class="form--field-container -visible-overflow">- <%= f.date_picker :start_date %>- </div>+ <%= f.date_picker :start_date, container_class: '-xslim' %></div><div class="form--field">- <label- class="form--label"- for="version_effective_date"- ><%= t(:effective_date) %></label>- <div class="form--field-container -visible-overflow">- <%= f.date_picker :effective_date %>- </div>+ <%= f.date_picker :effective_date, container_class: '-xslim' %></div><div class="form--field">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 a8fd3c68a2c..39556e977f2 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,6 +224,12 @@ 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));+ }+this.datePickerInstance = new DatePicker(this.injector,this.id,diff --git a/frontend/src/global_styles/content/_forms.sass b/frontend/src/global_styles/content/_forms.sassindex 25bd9c33612..6a8a159ad21 100644--- a/frontend/src/global_styles/content/_forms.sass+++ b/frontend/src/global_styles/content/_forms.sass@@ -26,7 +26,7 @@// See COPYRIGHT and LICENSE files for more details.//++-$form--field-types: (text-field, text-area, select, check-box, radio-button, range-field, search, file)+$form--field-types: (text-field, text-area, select, check-box, radio-button, range-field, search, file, date-picker)%input-styleborder: var(--content-form-input-border)