Wednesday, 30 March 2011

ASP.Net Ajax: Calendar Extender lost Saturdays!

I think updating to a newer version of the Ajax Control Toolkit caused this problem.

I had a client call to say there were days missing from the calendar. When I looked it turns out it was just Saturdays. Through trial and error I established the problem was css related. I'm guessing that the calendar was picking up padding or margins from a table it was placed within.

The trick is to reset the calendar's own css code to the following (in the stylesheet):

.ajax__calendar_days table tr td, .ajax__calendar_months table tr td, .ajax__calendar_years table tr td {padding:0; margin:0;}

No comments:

Post a Comment