akveo / akveo/nebular

dateChange event of nb-calendar is emitting more that one date

Đang mở
#2,716 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
needs info
Ngôn ngữ chính
TypeScript
Star
8.1k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Issue type

**I'm submitting a ...** (check one with "x")

* [x ] bug report
* [ ] feature request

### Issue description

**Current behavior:**
I'm using a simple nb-calendar in a dialog, I notice, that if I: Open the calendar and click outside the dialog (this close the dialog and calendar) And I repeat the process, lets say 3 times more. When I select the date it will emit the date 4 times. ( 3 times that I cancel and the time I cancel)

I believe, that is a subscription that keeps opened and should be close, when I select the date, all the subscriptions trigger and that's why I receive 4 emitis

**Expected behavior:**

Emit once

**Steps to reproduce:**
Im using a simple nb-calendar, I notice, that if I: Open the calendar and click outside (this close the calendar) And I repeate the process, lets say 3 times more. When I select the date it will emit the date 4 times. ( 3 times that I cancel and the time I cancel)

**Related code:**

```HTML

```

a service

```Typescript
dateChange(selectedDate: Date) {
this.pickerCalendarAction.changedDate$.next(selectedDate);
}
```
changedDate$ is emitting 4 values ( in the example I gave)
### Other information:

**npm, node, OS, Browser**
```

```

**Angular, Nebular**
```

```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.