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
1 month 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]
1 month 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
1 month ago.

It works,
Thank you so much.

New Reply
This reply is
Your name (optional):