views:

73

answers:

2

I am using the silverlight (v3.5) calendar control in my web application. The first day of the week in this calendar control is set to Monday.

On PCs the calendar control the Day labels above the dates are working perfectly.

On Mac computers, the calendar control displays the dates correctly, but the day labels above the dates are always 1 day to the right for example the 2nd March is seen as Wednesday when in fact it is Tuesday.

Has anyone come across this before? Or does anyone know what I'm doing wrong here??

A: 

Sounds like a bug in a the Silverlight Calendar conrtrol. First, I'd advise checking if it wasn't fixed in Silverlight 4. So download the developer mac runtime and check if anything changed.

If it's not solved in Silverlight 4, I'd file a bug if I were you @ http://tinyurl.com/SilverlightBug

Since you haven't actually supplied any minimal and basic repro (xaml) and a print screen, it's hard to know exactly what's wrong. But worst case scenario, you should be able to traverse the visual tree, find the TextBlocks and change them.

JustinAngel
A: 

Hi

Here is the code I am running (Wanted to add a snapshot but the anti-spamming control prevents me) Yesterday was the 2nd of March which it shows correctly but it was a Tuesday not a Wednesday as it gets displayed on the Mac's.

The first calendar control is the one called "DefaultCal". Nothing special just a default calendar. The second control called "ChangedCal1" has the setting of FirstDayOfWeek set to "Monday" to test if it had any impact on the control and the last one called "ChangedCal2" has the FirstDayofWeek set to "Sunday" which is the default setting for a Mac.

On the Pc all three calendars appear correct and even on the mac the "date part" (number portion) is correct, it is only the "Day Labels" (Mon Tue Wed...) that somehow shift right one space.

Just to be clear this is a new default Silverlight App I created to test this calendar issue because I wanted to make sure no settings or any other code can influence the results.

Thanks

  <Grid x:Name="LayoutRoot">
    <StackPanel x:Name="MainP">
        <TextBlock x:Name="Temp" Text="This is the control"></TextBlock>
        <controls:Calendar x:Name="DefaultCal" ></controls:Calendar>
        <TextBlock x:Name="Temp2" Text="Monday"></TextBlock>
        <controls:Calendar x:Name="ChangedCal1" FirstDayOfWeek="Monday"></controls:Calendar>
        <TextBlock x:Name="Temp3" Text="Sunday"></TextBlock>
        <controls:Calendar x:Name="ChangedCal2" FirstDayOfWeek="Sunday"></controls:Calendar>
    </StackPanel>

Lana Barton