akveo / akveo/nebular

NbRangepickerComponent and input binding with NbDatepickerDirective

未关闭
#2,222 2 条评论 6 个 reaction 已指派 1 人 已被 @katebatura 认领 在 GitHub 查看
主要语言
TypeScript
星标
8.1k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

### Issue type

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

* [x ] bug report
* [ ] feature request

### Issue description

When the value of the variable bound to a NbRangeDatepicker component is changed the datepicker component is displaying the new date but the input is not refreshed with the date.

**Expected behavior:**
The NbRangeDatepicker component should update the input.

**Steps to reproduce:**

- Pick a range of dates with the selector of the component.
- Update the variable bound to the nbRangePicker with a new valid value.
- The input contains the same text(date) but if you open the rangepicker you will see the new value.

**Related code:**
HTML:


...
TS:
this.period = { start: X end: Y };

** Hack: **
By now, is solved doing:
@ViewChild(NbDatepickerDirective, { static: false }) datePickerDirective: NbDatepickerDirective;

this.datePickerDirective.writeValue(NEWVALUE);

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。