We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

24hour format

Hello,
I try to set the time format in the weekview for the hours at the left side to 24hour format instead of am/pm.

 <xForms:SfSchedule ScheduleView="WeekView">
      <xForms:WeekViewSettings>
        <xForms:WeekLabelSettings TimeFormat="hh"/>
      </xForms:WeekViewSettings>
    </xForms:SfSchedule>
This doesn´t work, do you have any hints? Is it possible at all?

Thanks,
sull

4 Replies

SI Siggi May 14, 2016 08:16 PM UTC

Hello again,
I forgot to mention that I tried using the Schedule in a XAML page.
When doing the configuration in code behind timeformat = "HH" does the job.



JO Joy Oyiess Rex  K Syncfusion Team May 16, 2016 11:25 AM UTC

Hi Siggi,

Thanks for your interest in Syncfusion products.

We have analyzed your requirement of customizing the TimeFormat of WeekLabelSettings to 24 hours format, in order to achieve this, the value for TimeFormat should be set as “HH”. As WeekLabelSettings is a complex property of WeekViewSettings, it can be represented in XAML as mentioned below,

Code Snippet:
 
  
<schedule:SfSchedule x:Name="schedule"  ScheduleView="WeekView" >
       <schedule:SfSchedule.WeekViewSettings>
            <schedule:WeekViewSettings >
                <schedule:WeekViewSettings.WeekLabelSettings>
                    <schedule:WeekLabelSettings TimeFormat="HH" />
                </schedule:WeekViewSettings.WeekLabelSettings>
            </schedule:WeekViewSettings>
        </schedule:SfSchedule.WeekViewSettings>
 </schedule:SfSchedule>
 


Please let us know, if you need any further assistance.

Regards,
Joy Rex. 



SI Siggi May 16, 2016 12:37 PM UTC

Hi,
your provided solution works, that was of course my fault.
Thank you very much.
Regards,
Siggi


SG Swathi Gopal Syncfusion Team May 17, 2016 07:20 AM UTC

Hi Siggi, 
 
Thanks for your update. We are glad that your issue got resolved. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Swathi G 


Loader.
Live Chat Icon For mobile
Up arrow icon