String to RadDatePicker

3 posts, 1 answers
  1. STEPHEN
    STEPHEN avatar
    13 posts
    Member since:
    Sep 2010

    Posted 04 Oct 2010 Link to this post

    I am carrying over a session variable from a raddatepicker on another page.  How to I convert it from the string below to be the default value of the raddatepicker on the new page?

    Dim strPayDate As String = CType(Session.Item("PayDate"), String)
            If Not Page.IsPostBack Then
                'convert string to date
                Dim dt As DateTime
                dt = Convert.ToDateTime(strPayDate)
                RadPayDate1 = dt
                

    Error is "Date cannot be converted to Teleric.WebUI.RadDatePicker. Thank you.
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Oct 2010 Link to this post

    Hello Stephen,


    You need to use the SelectedDate property of RadDatePicker as shown below.

    C#:
    RadPayDate1.SelectedDate = dt1.Date

    http://www.telerik.com/help/aspnet-ajax/calendar_radcalendarselection.html


    -Shinu.
  3. STEPHEN
    STEPHEN avatar
    13 posts
    Member since:
    Sep 2010

    Posted 05 Oct 2010 Link to this post

    Thanks, Really appreciate the help.
Back to Top