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

Highlight Today and Shorten Weekday Names in DayPilot Lite Monthly Calendar

Asked by Sahil Vadher
21 days ago.

Enhance the DayPilot Lite monthly calendar with the following features:

  1. Highlight Today: Apply a custom CSS class to the cell representing the current day. Ensure that the styling adapts dynamically to the application's theme, so the highlight color changes appropriately when the theme changes.

  2. Shorten Weekday Headers: Update the monthly calendar header to display short names for weekdays (e.g., “Mon” instead of “Monday”).

Answer posted by Dan Letecky [DayPilot]
20 days ago.

You can use the onBeforeCellRender event handler to add a custom CSS class to selected cells.

At this moment, the Lite version doesn’t support the onBeforeHeaderRender event. However, you can use a custom locale with dayNames values you want to use as column headers.

Comment posted by Sahil Vadher
20 days ago.

I have installed "@daypilot/daypilot-lite-angular": "^5.6.0".
See below there is no property related to cssClass.


interface MonthBeforeCellRenderArgs {

        readonly control: DayPilot.Month;

        readonly cell: {

            readonly start: DayPilot.Date;

            readonly end: DayPilot.Date;

            readonly properties: {

                business: boolean;

                headerHtml: string;

                html: string;

                backColor: string;

            };

        };

    }

Comment posted by Dan Letecky [DayPilot]
18 days ago.

It looks like the cssClass property isn’t exposed in the latest version (5.7.0), indeed.

If there is any problem, please let me know.

Comment posted by Anonymous
16 days ago.

What is difference between sandbox build and normal version.
Can I use sandbox version in production app?

Comment posted by Dan Letecky [DayPilot]
15 days ago.

The sandbox version is the latest development build. It is not always stable. But this particular version should work fine.

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):