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

Calendar Questions

4 Answers 282 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
DogBizPro
Top achievements
Rank 1
DogBizPro asked on 04 Sep 2015, 02:17 AM

I am trying to use this control to allow clients to set dates when their business is closed. Basically I want to display a year at a time and allow them to select dates and save those to a database. 

1. That pretty much works well, except I would like to show the calendar starting at January first for the current year and cannot figure that out. 

2. How do I reload the saved/selected dates? I see that SelectedDates is read-only.

4 Answers, 1 is accepted

Sort by
0
DogBizPro
Top achievements
Rank 1
answered on 04 Sep 2015, 06:37 PM

More questions/issues...

I figured out #2 above, but I am having more issues. I am trying to disable certain days so clients cannot select those. The selection/enabling/disabling is working fine it is the formatting/css that seem to be flawed.

For example I am going through and adding all the holidays to the SpecialDays in the PageLoad and those are disabled and the css class is radDisabled automatically then and so the back color displays as a lighter shade of the specified color = GREAT!

However, when I do the exact same code in the OnDayRender method the date(s) are disabled and not selectable but the back colors does not change like the other. What can I do to make both of these appear the same on the calendar?

 

Here is the code I am using in both places.

 

            RadCalendarDay calendarDay = new RadCalendarDay();
            calendarDay.Date = CurrentDate.Date;
            calendarDay.IsDisabled = true;
            calendarDay.IsSelectable = false;
            radCalendar.SpecialDays.Add(calendarDay);​

0
DogBizPro
Top achievements
Rank 1
answered on 04 Sep 2015, 07:44 PM

Anyone here today?

I have found workarounds for many of my issues, but now the issues is with the post back. I and using the same basic code as above but added the line below to the dayrender event to get all the special and disabled dates to show the same way when the calendar loads.

             e.Cell.CssClass = "rcDisabled";

The problem is when you select a date it loses that css since apparently that is not called on postback. So how do I get the cells to display correctly even on postback?

Any quick replies are much appreciated, we are on a time crunch for implementing this.

0
Eyup
Telerik team
answered on 08 Sep 2015, 01:30 PM
Hello Stephanie,

I am sending two sample web site as a reference point. Please examine the attached applications and let me know which one you prefer to continue with. In addition, you can also instruct us any further steps or requirements.

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
0
DogBizPro
Top achievements
Rank 1
answered on 08 Sep 2015, 02:27 PM
Thanks. I think I finally got things figured out while I was awaiting responses.
Tags
Calendar
Asked by
DogBizPro
Top achievements
Rank 1
Answers by
DogBizPro
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or