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

Delay init of flatpickr

Oliver Günther131ad7e5a2ec
diff --git a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts
index b6399487a9a..4b192c17c9c 100644
--- a/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts
+++ b/frontend/src/app/shared/components/datepicker/modal-single-date-picker/modal-single-date-picker.component.ts
@@ -53,6 +53,7 @@ import { debounce } from 'lodash';
import {
SpotDropModalTeleportationService,
} from 'core-app/spot/components/drop-modal/drop-modal-teleportation.service';
+import { delay } from 'rxjs';
@Component({
selector: 'op-modal-single-date-picker',
@@ -216,6 +217,9 @@ export class OpModalSingleDatePickerComponent implements ControlValueAccessor, O
private initializeDatepickerAfterOpen():void {
this.spotDropModalTeleportationService
.afterRenderOnce$(true)
+ .pipe(
+ delay(100),
+ )
.subscribe(() => {
this.initializeDatepicker();
});