I have a couple raddatepicker controls that are not enabled correctly after I've set date1.enabled = true
.
The master page contains a client side function that sets disabled controls to readonly:
function ParseDocumentForDisabled() {
//Transform the disabled controls that are not inside a DIV
$("input[type=text][disabled]").each(function (i, v) {
if ($(v).attr('OnClientLoad') != '' && $(v).attr('OnClientLoad') != undefined)
return;
$(v).removeAttr("disabled");
$(v).attr("readonly", "");
});
//Transform the disabled DIVs
$("div[disabled]").each(function (i, v) {
$(v).removeAttr("disabled");
//Take each control type and parse it
$(v).find("input[type=text]").attr("readonly", "");
$(v).find("textarea").attr("readonly", "");
$(v).find("checkbox").attr("disabled", "disabled");
$(v).find("input[type=submit]").attr("disabled", "disabled");
$(v).find("input[type=button]").attr("disabled", "disabled");
});
}
The controls are in a radwindow popup and linked to the event of a radcombobox change, however, after the combobox event sets either raddatepicker's enabled property to true after being disabled, only the calendar icon becomes usable again, the textarea remains readonly.
Thank you for your help. Iris
[edit]
Managed to fix the issue by setting date1.dateinput.enabled = true
. The problem was that the textarea remained readonly instead of being disabled and the jquery didn't activate it properly.