search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Are we able to change the bar width?

Asked by JC
2 years ago.

Take this code:
if (args.e.type == "pending") {
args.e.barColor = "#c5003b";
args.e.barBackColor = "#c5003b";
We need to change the args.e.bar that appears on the left to be a bit wider. ie. something like
args.e.barWidth = "12px";

Answer posted by Dan Letecky [DayPilot]
2 years ago.

You can change the bar width using CSS:

<style>
.wider-bar .calendar_default_event_bar,
.wider-bar .calendar_default_event_bar_inner {
  width: 12px;
}
</style>

And add the "wider-bar" CSS class to the event:

dp.onBeforeEventRender = args => {
  if (args.e.type == "pending") {
    // ...
    args.data.cssClass = "wider-bar";
  }
}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.