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

RadDatePicker

2 Answers 79 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
mike
Top achievements
Rank 1
mike asked on 24 Nov 2009, 11:36 PM

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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Nov 2009, 07:50 AM
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.
0
Dimo
Telerik team
answered on 25 Nov 2009, 03:31 PM
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.
Tags
Calendar
Asked by
mike
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dimo
Telerik team
Share this question
or