RadDatePicker

3 posts, 0 answers
  1. mike
    mike avatar
    14 posts
    Member since:
    Feb 2009

    Posted 24 Nov 2009 Link to this post

    Using the RadDatePicker i wish to allow free text as well as dates for example TBA or N/A etc.. .
    How do i turn of date validation ie.. an exclamation mark appears and the RadDatePicker's border turns red when a non date is entered.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Nov 2009 Link to this post

    Hi Mike,

    Try adding following CSS for not showing the invalid style when typing custom text.

    CSS:
     
        <style type="text/css"
            .MyInvalidStyleClass 
            { 
                border1px solid gray !important; 
                color: Black !important; 
                background-imagenone !important; 
            } 
        </style> 

    ASPX:
     
        <telerik:RadDatePicker ID="RadDatePicker3" runat="server"
            <DateInput InvalidStyle-CssClass="MyInvalidStyleClass"
            </DateInput> 
        </telerik:RadDatePicker> 

    Thanks,
    Princy.
  3. Dimo
    Admin
    Dimo avatar
    8456 posts

    Posted 25 Nov 2009 Link to this post

    Hello Mike,

    I am afraid that using custom text with the RadDatePicker control is not allowed - after all, this control has been designed to work with dates and for example its value is of DateTime type.

    If you still prefer using the same approach, then you can retrieve the user-input on the server with RadDatePicker1.ValidationDate property (the SelectedDate property will return null).

    All the best,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top