The problem is that the background of the calendar popup gets colored in red but not the background of the actual control in the page (the "text box" with the date). How can I change the color the input control of a DateTime picker?
Thanks for your reply. I know that I can customize the CSS but I chose this approach to change the color of the control on demand.
For simplictiy, I did not add any further code, but my actual event handler will look like this:
if (bigProblem)
args.Attributes.Add("style", "background-color:red !important;");
So it does not help just modifying the global CSS. Isn't there any way to conditionally change the color of the control (textbox) when the date is rendered/chnaged?
The only way is to assign custom class depending on your requirement. Set the class attribute to a property page which you can update as needed e.g. red-datepicker or blue-datepicker.