Skip to content

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

Fix closing of single date picker

Benjamin Bädorf8d5ec86b1c17
diff --git a/frontend/src/app/features/work-packages/components/filters/filter-date-value/filter-date-value.component.html b/frontend/src/app/features/work-packages/components/filters/filter-date-value/filter-date-value.component.html
index ccb611f9945..a11e51c12c7 100644
--- a/frontend/src/app/features/work-packages/components/filters/filter-date-value/filter-date-value.component.html
+++ b/frontend/src/app/features/work-packages/components/filters/filter-date-value/filter-date-value.component.html
@@ -1,10 +1,9 @@
-<!--op-single-date-picker
+<op-single-date-picker
+ classes="advanced-filters--date-field"
(changed)="value = parser($event)"
[value]="formatter(value)"
[opAutofocus]="shouldFocus"
- required="true"
+ [required]="true"
[id]="'values-' + filter.id"
[name]="'v[' + filter.id + ']'"
- classes="advanced-filters--date-field"
- size="10"
-></op-single-date-picker-->
+></op-single-date-picker>
diff --git a/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.html b/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.html
index d30f4d69bd0..601ca2848a1 100644
--- a/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.html
+++ b/frontend/src/app/shared/components/datepicker/single-date-picker/single-date-picker.component.html
@@ -1,6 +1,6 @@
<spot-drop-modal
[open]="isOpened"
- (close)="close()"
+ (closed)="close()"
>
<button
slot="trigger"
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.ts
index 66d1754633e..1fb490ac102 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
@@ -76,6 +76,8 @@ export class OpSingleDatePickerComponent implements ControlValueAccessor, AfterV
@Input() name = '';
+ @Input() required = false;
+
public workingDate:Date = new Date();
public isOpened = false;
diff --git a/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass b/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
index d49efd0c114..c600f26dde5 100644
--- a/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
+++ b/frontend/src/app/shared/components/datepicker/styles/datepicker.modal.sass
@@ -1,16 +1,10 @@
@import '../../app/spot/styles/sass/variables'
.op-datepicker-modal
- z-index: 500
- width: auto
+ width: 100vw
// Basically the width of the two calendars next to each other + spacings
// will be overwritten on mobile
- max-width: 600px
- min-height: 200px
- box-shadow: $spot-shadow-light-mid
- // Apply a bottom margin before the banners are loaded
- // to avoid overlapping
- margin-bottom: 60px
+ max-width: 300px
&--toggle-actions-container
display: grid
diff --git a/frontend/src/app/spot/styles/sass/common/container.sass b/frontend/src/app/spot/styles/sass/common/container.sass
index 8db96398799..4b1cb09f01b 100644
--- a/frontend/src/app/spot/styles/sass/common/container.sass
+++ b/frontend/src/app/spot/styles/sass/common/container.sass
@@ -22,6 +22,18 @@
&:last-child
margin-bottom: $spot-spacing-1
+ > .spot-container
+ margin: 0
+ margin-top: $spot-spacing-1
+
+ > .spot-container:first-child,
+ > .cdk-focus-trap-anchor:first-child + .spot-container
+ margin-top: $spot-spacing-0_5
+
+ > .spot-action-bar
+ &:not(:first-child)
+ margin-top: $spot-spacing-0_5
+
> .spot-list
margin: $spot-spacing-1 0
diff --git a/frontend/src/global_styles/content/_advanced_filters.sass b/frontend/src/global_styles/content/_advanced_filters.sass
index 9cb3c3b62ca..6748eca253b 100644
--- a/frontend/src/global_styles/content/_advanced_filters.sass
+++ b/frontend/src/global_styles/content/_advanced_filters.sass
@@ -37,7 +37,6 @@ $advanced-filters--grid-gap: 10px
@extend %filters--container
padding: 1rem
max-height: 50vh
- overflow-y: auto
position: relative
margin: 0 0 10px 0