Closed jaysoniscale closed 6 years ago
Hi @jaysoniscale, could you please provide more context. Maybe you can create stackblitz?
Hi @Tibing I managed to work with it somehow by this I can track the start date and end date as the nb-calendar-range updates.
<nb-calendar-range [range]="range" [min]="min" [max]="max" (rangeChange)="getRangeDate($event)"></nb-calendar-range>
getRangeDate(event) {
if (event.start && event.end) {
this.fromDate = new Date(event.start);
this.toDate = new Date(event.end);
this.range = {
start: NbDateTimeUtil.addDay(this.fromDate, 0),
end: NbDateTimeUtil.addDay(this.toDate, 0),
}
this.loadChart();
}
}
I think the problem here is that rangeChange
event isn't mentioned in the documentation for calendar component. Actually the whole NbCalendarRangeComponent
is not covered by docs.
Hi @cmajsmith , @jaysoniscale , we'll update docs asap.
So is this problem resolved in an appropriate way?
calendar-range.component.ts Emits range when start selected and emits again when end selected.
@Output() rangeChange: EventEmitter
So what was the solution to this problems?
Issue type
I'm submitting a ... (check one with "x")
Issue description
Expected behavior: I'm using the nb-calendar-range as a parameters for my service in loading data to chart and tables I successfully do it on load but I cannot track the change event of the nb-calendar-range tag.
Related code:
Other information:
npm, node, OS, Browser
Angular, Nebular