在Nativescript + Angular应用程序中,我正在使用带有locale =“ it-IT”的RadCalendar组件:
<RadCalendar [eventSource]="calendarEvents" id="calendar" #calendar
(navigatingToDateStarted)="onNavigatingToDateStarted($event)"
(loaded)="calendarLoaded($event)" locale="it-IT" eventsViewMode="Inline">
</RadCalendar>
一切正常,可以正确翻译月份。但是,当我打开内联事件时,如果其中一个事件全天都充满了,它会以英文显示标签“ all day”:
我试图手动格式化它,但是它不起作用:
calendarLoaded(args: EventData) {
this.calendar.nativeElement.dayViewStyle.dayEventsViewStyle = new DayEventsViewStyle();
this.calendar.nativeElement.dayViewStyle.dayEventsViewStyle.timeLabelFormat = "HH:mm";
this.calendar.nativeElement.dayViewStyle.allDayEventsViewStyle = new AllDayEventsViewStyle();
this.calendar.nativeElement.dayViewStyle.allDayEventsViewStyle.allDayText = "Intera giornata";
this.calendar.nativeElement.reload();
this.cdr.detectChanges();
}