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

Issues when set the schduler selecd date in page load

1 Answer 40 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Harikrishnan
Top achievements
Rank 1
Harikrishnan asked on 21 Jan 2013, 02:09 PM
Hi

I am facing a big issue,

When we set the scheduler selecteddate in page load by another date picked which located in the same page, That time all the appoints are went to invisible..y this happnd.....?

Am using vb.net ..

any idea?pls help me its urg

RadScheduler1.SelectedDate= rdDatePicker.SelectedDate

 

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 24 Jan 2013, 03:01 PM
Hello,

Indeed there is a problem because the RadDatePicker control returns a type of DateTime?(nullable). The RadScheduler SelectedDate works with DateTime type and some additional modifications are required as shown in the code snippet below:
//markup code
<telerik:RadScheduler ID="RadScheduler1" runat="server"></telerik:RadScheduler>
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" AutoPostBack="true" SelectedDate="2002 11 22"></telerik:RadDatePicker>
//code behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
    If RadDatePicker1.SelectedDate IsNot Nothing Then
        Dim datePickerDate As Long = RadDatePicker1.SelectedDate.Value.Ticks
        Dim currentDate As New DateTime(datePickerDate)
        RadScheduler1.SelectedDate = currentDate
    End If
 
End Sub

Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Harikrishnan
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or