Hi,
We are using telerik version 2011.1.413.35. We use telerik RadDatePicker. My criteria is to enable or disable DatePopUpButton based on the check in the check box. The following code i have used,
The scripts for enabling and disabling DateInput and DatePopUpButton are,
My problem is the DateInputButton shown as disbled in firefox irrespective of the check. but i can click the popup and retrieve the date. only the appearance shows as disabled. In IE8 the appearance of the DateInputButton is shown as enabled irrespective of the check. Is there any way to solve this? Please guide me.
Thanks,
Hema.
We are using telerik version 2011.1.413.35. We use telerik RadDatePicker. My criteria is to enable or disable DatePopUpButton based on the check in the check box. The following code i have used,
<
asp:CheckBox
ID
=
"CheckBoxNoExpiration"
runat
=
"server"
Text
=
"No Expiration"
Checked
=
"true"
CssClass
=
"chkBox"
onclick
=
"javascript:return ToggleDatePicker();"
/>
<
telerik:RadDatePicker
DateInput-DisplayDateFormat
=
"MM/dd/yyyy"
ID
=
"RadExpiryDate"
EnableEmbeddedSkins
=
"false"
Skin
=
"Web20"
Culture
=
"en-US"
Width
=
"100px"
MinDate
=
"01/01/1900"
runat
=
"server"
TabIndex
=
"11"
>
<
Calendar
ID
=
"Calendar1"
runat
=
"server"
EnableEmbeddedSkins
=
"false"
ShowOtherMonthsDays
=
"false"
ShowRowHeaders
=
"false"
Skin
=
"Web20"
BorderWidth
=
"1"
>
<
SpecialDays
>
<
telerik:RadCalendarDay
Repeatable
=
"Today"
Date
=
""
>
<
ItemStyle
BackColor
=
"#E0F0FF"
BorderColor
=
"Gray"
/>
</
telerik:RadCalendarDay
>
</
SpecialDays
>
</
Calendar
>
<
DateInput
runat
=
"server"
ID
=
"radDateExpiry"
DateFormat
=
"MM/dd/yyyy"
Culture
=
"en-US"
MaxLength
=
"10"
ReadOnly
=
"false"
MinDate
=
"01/01/1900"
Style="height: 16px; background: white;
padding-top: 3px; border: 1px solid #7F9DB9; text-align: left; margin-top: 1px;
font-size: 13px; font-family: Verdana, Verdana, Sans-Serif; color: black;">
</
DateInput
>
<
DatePopupButton
HoverImageUrl
=
"../Images/calendar.png"
ImageUrl
=
"../Images/calendar.png"
Enabled
=
"false"
/>
</
telerik:RadDatePicker
>
The scripts for enabling and disabling DateInput and DatePopUpButton are,
function ToggleDatePicker() {
setTimeout(SetEnablePropertyToExpDate, 100);
}
function SetEnablePropertyToExpDate() {
setTimeout(SetEnablePropertyToExpDate, 100);
var CheckBoxNoExpiration = document.getElementById('<%= CheckBoxNoExpiration.ClientID %>');
var DatePicker = $find('<%= RadExpiryDate.ClientID %>');
var MandatoryMark = document.getElementById('<%= MandatoryMark.ClientID %>');
if (CheckBoxNoExpiration != null) {
if (CheckBoxNoExpiration.checked) {
if (MandatoryMark != null)
MandatoryMark.style.display = 'none';
DatePicker.get_dateInput().disable();
DatePicker.get_dateInput.onclick = function() { return false; };
DatePicker._popupButton.disabled = true;
DatePicker._popupButton.onclick = function() { return false; };
}
else {
if (MandatoryMark != null)
MandatoryMark.style.display = 'inline';
DatePicker.get_dateInput().enable();
DatePicker._popupButton.disabled = false;
DatePicker._popupButton.onclick = function() { DatePicker.togglePopup(); return false; };
}
}
}
My problem is the DateInputButton shown as disbled in firefox irrespective of the check. but i can click the popup and retrieve the date. only the appearance shows as disabled. In IE8 the appearance of the DateInputButton is shown as enabled irrespective of the check. Is there any way to solve this? Please guide me.
Thanks,
Hema.