How do I change the text color only on Sundays in winform calendar?

1 Answer 126 Views
Calendar, DateTimePicker, TimePicker and Clock
HyenBae
Top achievements
Rank 1
HyenBae asked on 06 Oct 2022, 08:32 AM

Is there no API that basically provides?

It looked okay at first because it was implemented like the code below. However, pressing Next Button will not update on days other than that month.

        private void radCalendar1_ElementRender(object sender, RenderElementEventArgs e)
        {
            if (e.Day.Date.Year == DateTime.Now.Year
                && e.Day.Date.Month == DateTime.Now.Month
                && e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
                     e.Element.ForeColor = Color.Red;
        }

First

After, Next Button Click

 

1 Answer, 1 is accepted

Sort by
0
Maria
Telerik team
answered on 10 Oct 2022, 12:11 PM

Hi HyenBae Kim,

I noticed that this question is already answered in another thread you have opened on the same topic. Please see your answer in support ticket ID: 1582586. It can be found in your Telerik account.

Please use just one way to contact us for a specific problem. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one.

Thank you for understanding!

Regards,
Maria
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
HyenBae
Top achievements
Rank 1
Answers by
Maria
Telerik team
Share this question
or