angular-calendar
Version:
A calendar component that can display events on a month, week or day view
63 lines • 1.92 kB
JavaScript
/**
* This class is responsible for displaying all event titles within the calendar. You may override any of its methods via angulars DI to suit your requirements. For example:
*
* ```
* import { CalendarEventTitleFormatter, CalendarEvent } from 'angular-calendar';
*
* class CustomEventTitleFormatter extends CalendarEventTitleFormatter {
*
* month(event: CalendarEvent): string {
* return `Custom prefix: ${event.title}`;
* }
*
* }
*
* // in your component
* providers: [{
* provide: CalendarEventTitleFormatter,
* useClass: CustomEventTitleFormatter
* }]
* ```
*/
export var CalendarEventTitleFormatter = (function () {
function CalendarEventTitleFormatter() {
}
/**
* The month view event title.
*/
CalendarEventTitleFormatter.prototype.month = function (event) {
return event.title;
};
/**
* The month view event tooltip. Return a falsey value from this to disable the tooltip.
*/
CalendarEventTitleFormatter.prototype.monthTooltip = function (event) {
return event.title;
};
/**
* The week view event title.
*/
CalendarEventTitleFormatter.prototype.week = function (event) {
return event.title;
};
/**
* The week view event tooltip. Return a falsey value from this to disable the tooltip.
*/
CalendarEventTitleFormatter.prototype.weekTooltip = function (event) {
return event.title;
};
/**
* The day view event title.
*/
CalendarEventTitleFormatter.prototype.day = function (event) {
return event.title;
};
/**
* The day view event tooltip. Return a falsey value from this to disable the tooltip.
*/
CalendarEventTitleFormatter.prototype.dayTooltip = function (event) {
return event.title;
};
return CalendarEventTitleFormatter;
}());
//# sourceMappingURL=calendarEventTitle.provider.js.map