Angular-calendar: Wrap Event Title vertically for week view

Created on 30 Apr 2018  路  4Comments  路  Source: mattlewis92/angular-calendar

Is there any way that I can wrap my titles vertically in week view and horizontally in day view.

I have my title lengthy and its getting truncated for week view and day view. Attached the screenshots
weekview

I am using angular 5

Most helpful comment

This comes two years late, but if anyone else has this issue I achieved event title word wraps (where vertical space is available) using the CalendarEvent _cssClass_ property based on Matt's demo here.

image

calendar.component.ts

Define a custom class by adding your own css class name to the event's _cssClass_ property.

events: CalendarEvent[] = [
    {
      title: 'Has custom class',
      color: colors.yellow,
      start: new Date(),
      cssClass: 'my-custom-class',
    },
  ];

styles.css

Add the css class to your global _styles.css_ file with the following style change.

.my-custom-class span{
    white-space: normal !important;
}

All 4 comments

Unfortunately there's no trivial way to do this, there are tooltips that the user can mouse over to see the full title though. You might be able to get something working by using a custom template and some additional styling for the week view event component.

This comes two years late, but if anyone else has this issue I achieved event title word wraps (where vertical space is available) using the CalendarEvent _cssClass_ property based on Matt's demo here.

image

calendar.component.ts

Define a custom class by adding your own css class name to the event's _cssClass_ property.

events: CalendarEvent[] = [
    {
      title: 'Has custom class',
      color: colors.yellow,
      start: new Date(),
      cssClass: 'my-custom-class',
    },
  ];

styles.css

Add the css class to your global _styles.css_ file with the following style change.

.my-custom-class span{
    white-space: normal !important;
}

This comes two years late, but if anyone else has this issue I achieved event title word wraps (where vertical space is available) using the CalendarEvent _cssClass_ property based on Matt's demo here.

image

calendar.component.ts

Define a custom class by adding your own css class name to the event's _cssClass_ property.

events: CalendarEvent[] = [
    {
      title: 'Has custom class',
      color: colors.yellow,
      start: new Date(),
      cssClass: 'my-custom-class',
    },
  ];

styles.css

Add the css class to your global _styles.css_ file with the following style change.

.my-custom-class span{
    white-space: normal !important;
}

I think it would be a good idea to have an example of this solution in the documentation..

please help me how design this type of calender

Was this page helpful?
0 / 5 - 0 ratings

Related issues

no-more picture no-more  路  3Comments

fmoessle picture fmoessle  路  5Comments

AstRonin picture AstRonin  路  4Comments

chaouiy picture chaouiy  路  3Comments

mattlewis92 picture mattlewis92  路  3Comments