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

How can I display shorten name of the Week?

Asked by Akhtar Raza
2 years ago.

I want to display shortened names of the week, Like Mon, Tue, Wed etch.

this.configDay.timeHeaders = [
{
"groupBy": "Week",
},
{
"groupBy": "Day",
"format": "ddd dd"
}
];
this.configDay.scale = "Day";
this.configDay.days = 7;
this.configDay.cellWidth = 190;

Have look at my code. I did changes but not helpful.

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

The timeHeaders property is only applicable to the Scheduler component. In the Calendar component, you can change the date format using headerDateFormat property:

https://api.daypilot.org/daypilot-calendar-headerdateformat/

Example:

this.configDay.headerDateFormat = "ddd d";

Another option is to use onBeforeHeaderRender event handler to override the generated HTML:

onBeforeHeaderRender: args => {
  args.header.html = args.header.start.toString("dddd").substring(0, 3);
}

See also:
https://api.daypilot.org/daypilot-calendar-onbeforeheaderrender/

Comment posted by Akhtar Raza
2 years ago.

It works,
Thank you so much.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.