Skip to content

Commit 345fb9d

Browse files
committed
feat(DateItem): update activeDate on focus #6275
1 parent 3be5074 commit 345fb9d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

projects/igniteui-angular/src/lib/calendar/days-view/days-view.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
[outOfRangeDates]="outOfRangeDates"
2929
[hideOutsideDays]="hideOutsideDays"
3030
[attr.tabindex]="tabIndex(day)"
31+
(focus)="activeDate = day.date.toLocaleDateString()"
3132
(onDateSelection)="selectDay($event)">
3233
{{ formattedDate(day.date) }}
3334
</igx-day-item>

projects/igniteui-angular/src/lib/calendar/days-view/days-view.component.ts

-2
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective implements Do
326326
public selectDay(event) {
327327
this.selectDateFromClient(event.date);
328328
this.onDateSelection.emit(event);
329-
330329
this.onSelection.emit(this.selectedDates);
331330
}
332331

@@ -387,7 +386,6 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective implements Do
387386
event.preventDefault();
388387
event.stopPropagation();
389388
const day = this.daysNavService.focusNextDate(event.target as HTMLElement, event.key);
390-
this.activeDate = day?.date.date.toLocaleDateString();
391389
}
392390

393391
/**

0 commit comments

Comments
 (0)