by Jim
Apr 19, 2007 1:20 PM
I had a hard time figuring out how to enable and disable the ComponentArt calendar control from javascript. This bit of code is for the picker/popup calendar combination as seen here.
var disabled = ...;
// The button isn't a server control, so it has a static Id
document.getElementById('scheduledDateCalendar_button').disabled = disabled;
document.getElementById('<%=this.scheduledDate.ClientID %>_picker').disabled = disabled;
The dom element written by the server which corresponds to the picker control has _picker appended to the client ID. Once you know this it's easy to disable that element.