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

SpecialDays ??

3 Answers 103 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Steve Bywaters
Top achievements
Rank 1
Steve Bywaters asked on 05 Sep 2008, 03:02 AM
Am contemplating moving to Q2 08 controls (from Q1 07 classic).
But it all seems a bit harder than it should be, at the moment.

Case in point: where are the code examples to show us how to do SpecialDays (like 'today') for a SharedCalendar?

You know, like this (below) for classic version?
I just cannot find it (and this code no longer works - compiler doesn't like 'Base')

      rdpStartDate.SharedCalendar = theCalendar 
      rdpEndDate.SharedCalendar = theCalendar 
 
      Dim today As RadCalendarDay = New RadCalendarDay()  
      today.Repeatable = Base.Calendar.Enumerations.RecurringEvents.Today  
      today.ItemStyle.CssClass = "radCalToday_" & theCalendar.Skin  
      theCalendar.SpecialDays.Add(today)  
 

Steve

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 05 Sep 2008, 06:01 AM
Hi Steve,

The following code example demonstrates how to avoid this problem

.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:RadDatePicker runat="server" ID="rdpStartDate"
        </telerik:RadDatePicker> 
        <telerik:RadDatePicker runat="server" ID="rdpEndDate"
        </telerik:RadDatePicker> 
        <telerik:RadCalendar ID="theCalendar" runat="server"
        </telerik:RadCalendar> 
    </div> 
    </form> 
</body> 
</html> 
 





.VB
Imports Telerik.Web.UI 
 
Partial Class Default2 
    Inherits System.Web.UI.Page 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
        rdpStartDate.SharedCalendar = theCalendar 
        rdpEndDate.SharedCalendar = theCalendar 
 
        Dim today As RadCalendarDay = New RadCalendarDay() 
        today.Repeatable = Calendar.RecurringEvents.Today 
 
        today.ItemStyle.CssClass = "radCalToday_" & theCalendar.Skin 
        theCalendar.SpecialDays.Add(today) 
    End Sub 
End Class 
 



All the best,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Steve Bywaters
Top achievements
Rank 1
answered on 08 Sep 2008, 12:05 AM
Well that's become simpler, which is nice
Only one line has changed, and 
     "Base.Calendar.Enumerations.RecurringEvents" has changed to
     "Calendar.RecurringEvents"

Is this documented? Because if it is, I missed it!
I looked in the backward compatibility stuff - could not see it there....

thanks for the info
Steve
0
Yavor
Telerik team
answered on 08 Sep 2008, 10:31 AM
Hi Steve,

This particular change has not been documented. I will make sure the relevant information is added to the contents of the help. Thank you for bringing this to our attention.

Best wishes,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Steve Bywaters
Top achievements
Rank 1
Answers by
Missing User
Steve Bywaters
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or