jQuery and ASP.NET

April 26, 2009

Saturdays go missing in the ASP.NET AJAX Calendar Extender




In the ASP.NET forums, I have seen many users complaining about the calendar display while using the ASP.NET AJAX CalendarExtender. The issue was particularly found in IE7 where Saturdays were not displayed in the calendar.

A simple solution that I had adopted sometime back was to set the padding and margin of the CalendarExtender to 0px;

The solution is shown over here:


<html xmlns="http://www.w3.org/1999/xhtml">


<head runat="server">


    <title></title>


    <style type="text/css">


    .calFixIE *


    {


        padding:0px;


        margin:0px;


    }


    </style>


</head>


<body>


    <form id="form1" runat="server">


    <div>


        <asp:ScriptManager ID="ScriptManager1" runat="server">


        </asp:ScriptManager>


        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>


        <cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="TextBox1"


        Format="dd/MM/yyyy" runat="server">


        </cc1:CalendarExtender>       


    </div>   


    </form>


</body>


</html>




'Like' us on our FaceBook page if you find this blog useful. Thanks!


Did you like this post?
kick it on DotNetKicks.com Save on Delicious
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

0 Responses to "Saturdays go missing in the ASP.NET AJAX Calendar Extender"
 

Copyright © 2009-2011 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions