Can't Center Dates

3 posts, 0 answers
  1. Winston Ware
    Winston Ware avatar
    6 posts
    Member since:
    Nov 2004

    Posted 05 Jun 2009 Link to this post

    I can’t figure out why I’m having trouble centering dates.  Everything else about the radcalendar is working wonderfully for me.  I can change the date font, bolding, italicizing, etc. I just can’t move the date to the middle top of the cell.  I’m using i.e. 7 as my target browser because that’s what our company build is.  Also I’m using RadControls for ASPNET AJAX Q1 2009 with VS 2008 and the .Net 3.5 framework.  Finally, this is happening on three separate computers.


    Thanks for any thoughts, Winston


    @ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>



    @ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>




    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">




    html xmlns="">




    head runat="server">



    <title>Untitled Page</title>











    <form id="form1" style="width:100%; height:100%" runat="server">









    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">






    <telerik:RadCalendar ID="RadCalendar1" Runat="server" AutoPostBack="True"






    ShowOtherMonthsDays="False" ShowRowHeaders="False"






    UseRowHeadersAsSelectors="False" CalendarTableStyle-Height="500PX" CalendarTableStyle-Width="734PX"






    SelectedDate="" ViewSelectorText="x" CellAlign="Center"



    CellVAlign="Top" BorderStyle="Double"







    DayStyle HorizontalAlign="Center" VerticalAlign="Bottom" Font-Bold="True"









    <SelectedDayStyle HorizontalAlign="Center" />



    <DayOverStyle HorizontalAlign="Center" VerticalAlign="Bottom" />
















  2. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 10 Jun 2009 Link to this post

    Hi Winston,

    Since the cellAlign and cellValign properties don't seem to work, you can add your own css-classes to specify the alignment.

    This can be done in this way:

    <telerik:RadCalendar .... DayStyle-CssClass="myDay" ....

    <style type="text/css">
    .myDay {
        text-align: center !Important;
        vertical-align: top !Important;

    There are a few other DayStyle classes you might want to add as well, like weekend and othermonth.


  3. DevCraft R3 2016 release webinar banner
  4. Winston Ware
    Winston Ware avatar
    6 posts
    Member since:
    Nov 2004

    Posted 10 Jun 2009 Link to this post

    That works.  Thanks!
Back to Top