This is a migrated thread and some comments may be shown as answers.

Can't Center Dates

2 Answers 59 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Winston Ware
Top achievements
Rank 1
Winston Ware asked on 05 Jun 2009, 02:06 PM

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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

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

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<div>

 

 

</div>

 

 

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

 

 

</telerik:RadScriptManager>

 

 

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

 

 

font-names="Arial,Verdana,Tahoma"

 

 

ShowOtherMonthsDays="False" ShowRowHeaders="False"

 

 

UseColumnHeadersAsSelectors="False"

 

 

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

 

 

EnableMultiSelect="False"

 

 

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

 

 

CellVAlign="Top" BorderStyle="Double"

 

 

Skin="Telerik">

 

<

 

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

 

 

Font-Italic="True">

 

 

</DayStyle>

 

 

<SelectedDayStyle HorizontalAlign="Center" />

 

 

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

 

 

</telerik:RadCalendar>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

2 Answers, 1 is accepted

Sort by
0
-DJ-
Top achievements
Rank 1
answered on 10 Jun 2009, 12:10 PM
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;
}
</style>

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

Regards,
-DJ-



0
Winston Ware
Top achievements
Rank 1
answered on 10 Jun 2009, 07:47 PM
That works.  Thanks!
Tags
Calendar
Asked by
Winston Ware
Top achievements
Rank 1
Answers by
-DJ-
Top achievements
Rank 1
Winston Ware
Top achievements
Rank 1
Share this question
or