Set time format to AM/PM runs into an illegal character exception

Hi 

I like to set the time format to AM/PM. It works fine to set the time format to 24 hours but I'm not able to set the time format to AM/PM.

The pattern I use is "hh tt". I always get an exception that the 't' is not valid. What is the pattern for using AM/PM format?

The code in the XAML is:

                      <syncSchedule:DayViewSettings.DayLabelSettings>
                            <syncSchedule:DayLabelSettings TimeFormat="{Binding TimeFormat}" />
                        </syncSchedule:DayViewSettings.DayLabelSettings>

where as the time format is set to "hh tt".

Regards
Bruno

4 Replies 1 reply marked as answer

SS SaiGanesh Sakthivel Syncfusion Team February 8, 2021 11:56 AM UTC

Hi Zimmermann, 
 
Thank you for using syncfusion support. 
 
#Regarding Set time format to AM/PM in SfSchedule 
We would like to inform you that as per implementation of SfSchedule, in default mode of time format is 12 hours format (AM / PM) in SfSchedule. we have attached the tested sample in the following link for your reference. 
 
 
 
Please let us know if you have any concern. 
 
Regards, 
SaiGanesh Sakthivel 



ZI Zimmermann February 9, 2021 12:28 PM UTC

Hi

Many thanks for the replay. Unfortunately, the app allows to switch from 24 hours format to 12 hours format with AM/PM. I tried several ways like setting the string to null, or just make an empty string but nothing brings the AM/PM format back.

Do you have any suggestion how I can achieve this.


Regards,
Bruno


SS SaiGanesh Sakthivel Syncfusion Team February 10, 2021 02:27 PM UTC

Hi Zimmermann, 
 
Thank you for the update. 
 
#Regarding Set time format to AM/PM runs into an illegal character exception 
Currently we are validating the reported scenario and let you know the details about the issue on February 12, 2021. We appreciate your patience until then.   
 
Regards, 
SaiGanesh Sakthivel 



SS SaiGanesh Sakthivel Syncfusion Team February 15, 2021 02:43 AM UTC

Hi Zimmermann,  
  
Thank you for the patience.  
  
#Regarding Set time format to AM/PM in SfSchedule  
We would like to inform you that you can overcome this scenario by setting the Time Format as “hh:mm aa” for the android platform. Please refer to the following code snippet for your reference. 
 
Code snippet 
<schedule:DayViewSettings.DayLabelSettings> 
    <schedule:DayLabelSettings TimeFormat="{OnPlatform Android=hh:mm aa, UWP=hh:mm tt}"  
                                TimeLabelSize="{OnPlatform Android=Micro}"> 
    </schedule:DayLabelSettings> 
    </schedule:DayViewSettings.DayLabelSettings> 
</schedule:DayViewSettings> 
 
We hope this helps. 
 
Regards, 
SaiGanesh Sakthivel 


Marked as answer
Loader.
Up arrow icon