Hi
In javascript how do I access custom attributes that I have added to a RadDatePicker in the code behind?
and the javascript:
In javascript how do I access custom attributes that I have added to a RadDatePicker in the code behind?
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadDatePicker1.ClientEvents.OnDateSelected =
"LoadChildrenForDatePicker"
;
RadDatePicker1.Attributes.Add(
"children"
,
"someothercontrolid"
);
}
and the javascript:
function
LoadChildrenForDatePicker(sender, e)
{
if
(e.get_oldDate() != e.get_newDate())
{
//doesn't work - throws error
//var childs = sender.getAttribute("children");
//doesn't work - returns null
var
childs = sender.get_element().getAttribute(
"children"
);
}
}