question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multiple components with same ngbdatepicker

See original GitHub issue

.toggle() doesnt close the previous opened datepicker window (working with multiple datepicker components)

to reporoduce:

  1. click on left button - it opens first window
  2. click on right button - it opens second window and doesnt close the previous

stackblitz

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jnizetcommented, May 17, 2020

It does. But your two datepickers have the same positionTarget element, so they both open themselves exactly at the same place.

Here’s your stackblitz with two different positionTarget: https://stackblitz.com/edit/angular-ivy-d8dprn?file=src/app/random-component/random-component.component.html

as you can see, one closes when the other is opened.

0reactions
kernydencommented, May 31, 2020

@benouat ye, i tried, but in some cases it “doesnt work well with” and looks like it very sensitive to higher position-relative containers. Im sure cdk dnd with it pointer-events styles the reason why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple Datepicker in one form Angular2 with difference ...
My favorite solution for cases like this is to create my own component that extends the one provided by library to fulfill my...
Read more >
NG0300: Multiple components match with the same tagname
Two or more components use the same element selector. Because there can only be a single component associated with an element, selectors must...
Read more >
ngb-datepicker multi date picker - StackBlitz
Multi -select date picker based on ngb-date-picker. ... import { Component } from '@angular/core';. import { NgbDateStruct } from '@ng-bootstrap/.
Read more >
NgbDatepicker - Angular powered Bootstrap
A highly configurable component that helps you with selecting calendar dates. NgbDatepicker is meant to be displayed inline on a page or put...
Read more >
Form Datepicker | Components - BootstrapVue
<b-form-datepicker> supports many of the props available on <b-calendar> as well ... which is the same format returned by native browser <input type="date"> ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found