This is a migrated thread and some comments may be shown as answers.

Can I have multiple selected day styles?

1 Answer 46 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
fernandes fernandes
Top achievements
Rank 1
fernandes fernandes asked on 08 Mar 2016, 11:11 AM

Hi everyone!

I need to have multiple selected day styles in my radCalendar. This is because a selected date on my calendar can be in on one of three status: approved/submitted and rejected.

 

So far, I have set the following style on my aspx page:

.RadCalendar_Default .rcRow .rcSelected
        {
            background-image: none !important;
            background: #0095c7 !important;
            color: #FFFFFF !important;
            border-color: #000000;
        }
        
        .RadCalendar_Default .rcRow .rcSelected a
        {
            color: #FFFFFF !important;
        }--%>
        
        
        .RadCalendar_Default .rcRow .rcSelectedSubmitted
        {
            background-image: none !important;
            background: #ffff00 !important;
            color: #FFFFFF !important;
            border-color: #000000;
        }
        
        .RadCalendar_Default .rcRow .rcSelectedSubmitted a
        {
            color: #FFFFFF !important;
        }

 

 

And this is what I have so far on my code behind:

 

foreach (DataRow currentChosenDate in dtChosenDates.Rows)
                {
                    selectedChosenDay = new RadDate((DateTime)currentChosenDate["SelectedDate"]);
                    calYearview.SelectedDates.Add(selectedChosenDay);

                    // Besides being selected, this must be marked as a special day...
                    specialDayChosenAndSelectedDay = new RadCalendarDay(calYearview);

                    specialDayChosenAndSelectedDay.Date = (DateTime)currentChosenDate["SelectedDate"];
                    specialDayChosenAndSelectedDay.ToolTip = currentChosenDate["ApprovalStatus"].ToString();
                    specialDayChosenAndSelectedDay.IsSelected = true;

                    specialDayChosenAndSelectedDay.ItemStyle.CssClass = "rcRow rcSelecteSubmitted"; // <--- This is where I'm stuck in....
                    calYearview.SpecialDays.Add(specialDayChosenAndSelectedDay);
                }

But no matter what I do, the calendar always sets the style for these selected days as: .RadCalendar_Default .rcRow .rcSelected

I'm trying to avoid to use Templates, so could you please shed some light on me?

 

Thanks in advance!

 

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 10 Mar 2016, 06:53 AM
Hi Fernandes,

Please run and examine the samples provided in the following post:
http://www.telerik.com/forums/calendar-questions#rk4_SG3ajUODfE-WKdhx2Q

Hope this helps.


Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
fernandes fernandes
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or