NbRangepickerComponent and input binding with NbDatepickerDirective
- 主要语言
- 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 还没有评估数据。