ngx-daterangepicker-material
ngx-daterangepicker-material copied to clipboard
Range label on input is not dynamically updated
Versions
- Angular version: 11
- component version: 5.0.0
Describe the bug
Although the calendar labels are correctly updated, the range label on input control (showRangeLabelOnInput
option) is not updated after changing the ranges
array.
To Reproduce Steps to reproduce the behavior:
I have the component declared like this in a reactive form:
<input
type="text"
name="calendar"
opens="left"
matInput
ngxDaterangepickerMd
[(ngModel)]="selectedDate"
class="form-control"
[locale]="locale"
[showRangeLabelOnInput]="true"
[alwaysShowCalendars]="true"
[showDropdowns]="true"
[ranges]="ranges"
(datesUpdated)="onChangeCalendar($event)"
/>
Make sure it has the option [showRangeLabelOnInput]="true"
.
Since the user may change the language (i18n) on the fly, after update ranges
array with the new labels, the input label is not updated.
Expected behavior
The Input label should be automatically updated as the ranges
get updated.