I am selecting a date in RadDateTime Picker and I am validating selected date in OnDateSelected() client event based on some validation i m clearing the textbox in RadDateTime Picker 1. But the problem is selected date is not clearing in RadDateTime Picker .
var datePicker2 = $find("<%= datepicker2.ClientID %>");
here i am doing validtion with datepicker2 and clearing textbox in datepicker1 but the prblm is how to clear sellected date in datetimepicker1.
<telerik:RadDatePicker ID="datetimepicker1" runat ="server" >
<DateInput ID="DateInputSentQcDate" DateFormat="MM/dd/yyyy" style="color:Navy" ReadOnly ="true" runat ="server"></DateInput>
<ClientEvents OnDateSelected="ValidateWithDtEntryDate" />
8 Answers, 1 is accepted
Thanks for your response.
I used clear() to clear the date but i am getting error like 'null' is null or not an object.I am using this functionality in user control.
So instead of clear() in calendar i am clearing textbox value in raddatepicker.But the problem is my validation(firstdate==second date) is working in first case as per validation and i am able to show alert. If i press ok of that showed alert and again i select same date my validation function ValidateWithDtEntryDate() is not firing to show validation alert instead it displaying selected date in textbox of datetimepicker.
Please give me a solution for this.
i have a raddatetimepicker and if the user enters the date it works OK, but if he later tries not to enter the date and presses backspace ,the page directs to the previous page,he is not able to deselect the date..
I am afraid we are not able to replicate the issue locally. Could you reproduce this behavior with any of our demos?
Please provide us the exact steps to reproduce the issue or open a support ticket to send us a sample runnable application demonstrating the erratic behavior. Thus, we will be able to further analyze the problem and provide a proper solution.
the Telerik team
I"ll tell you the steps:
Now,if the user once entered the date and then tries to delete it,it is not working.I also tried to do this:
but if i do this then,if the user enters alphabet or Chars like -,/ it is giving error.
I want that user cannot enter the date on its own,he has to pick it from the calender.
any help would be deeply regarded.
if i set the selecteddate property to null i"m getting the following exception:
Cannot create an object of type 'System.DateTime' from its string representation 'null' for the 'SelectedDate' property.
Please note that custom created controls are not supported even when they are inherited directly from RadControls.
Try using a default RadDatePicker declaration and see whether the issue still remains.
All the best,
the Telerik team