I have a form that appears in a RadWindow. On this form I have RadDatePicker.
There is a button on this form that calls some javascript to clear all of the form fields.
All get cleared, except for the RadDatePicker. Reason being, I cant find it.
The code I am trying to use looks like this.
However StartDatePicker is never found, therefore, never cleared.
I figure this might have something do to with the iFrame that the radWindow is in
So I tried finding the RadDatePicker like this.
That does not find it either.
So I tried this.
In this case StartDatePicker is NOT null,
However I then get the error..
StartDatePicker.clear is not a function
What is the trick here? How to I clear a RadDatepicker that is in a RadWindow?
There is a button on this form that calls some javascript to clear all of the form fields.
All get cleared, except for the RadDatePicker. Reason being, I cant find it.
The code I am trying to use looks like this.
var StartDatePicker = $find("<%=dpActivitytStartDate.ClientID %>");
if (StartDatePicker){
StartDatePicker.clear();
}
However StartDatePicker is never found, therefore, never cleared.
I figure this might have something do to with the iFrame that the radWindow is in
So I tried finding the RadDatePicker like this.
$("#rwAdvancedSearchForm").contents().find("[id$='dpActivityEndDate']")
That does not find it either.
So I tried this.
var StartDatePicker = $("[id$='rwAdvancedSearchForm']").contents().find("[id$='dpActivityEndDate']");
if (StartDatePicker){
StartDatePicker.clear();
}
In this case StartDatePicker is NOT null,
However I then get the error..
StartDatePicker.clear is not a function
What is the trick here? How to I clear a RadDatepicker that is in a RadWindow?