loads of useful information, examples and tutorials pertaining to web development utilizing asp.net, c#, vb, css, xhtml, javascript, sql, xml, ajax and everything else...

 



Advertise Here
C-Sharpener.com - Programming is Easy!  Learn Asp.Net & C# in just days, Guaranteed!

AJAX Control Toolit CalendarExtender : Where did Saturday go?

by naspinski 10/19/2008 7:42:00 AM

How to get back the lost day(s) on your AJAX control

More than once I have come across this, and it isn't obvious where the problem lies.  This happens when your table cells inherit strange padding/margins.  The CalendarExtender is a great tool, but it makes a crazy table that is an html nightmare.  I figure at first I could simply assign the CssClass to something else, but that negates what it is normally set to, which apparently does a lot as there are all sorts of divs, trs, tds, etc in that calendar.  Instead, using FireBug I found the css class it was using and simply override it with this.

 

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

 

And everything will be looking fine... seeing your Saturdays and everything.

 

Update - 19 October 2008

Turns out this didn't alone fix the problem, it only fixed the days... but, if you click on the month name, it brings up a menu of months, and if you click again, you get a menu of years... those are also broken.  So in order to fix them all, you will need this:

 

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

 

And now... everything is fixed.

 

Currently rated 4.3 by 4 people

  • Currently 4.25/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

ajax | asp.net | css

Related posts

Comments

3/17/2009 4:25:33 AM

Angry Black man
THanks! that fixed it! You consulting fee is in the mail!

Angry Black man us

7/7/2009 10:38:49 AM

xyanure
Thanks for the tip ! as for me, I had to add "border:none"
and finally it works perfectly

xyanure fr


Comments are closed