How to solve SfTimePicker cannot assign TValue to TimeSpan after 19.1.0.57

I create a new blazor server project and update index.razor as following

@page "/"
@using Syncfusion.Blazor.Calendars

Hello, world!

@bind-Value="myTime" Format="HH:mm:ss">
Welcome to your new app.
@code {
TimeSpan myTime = new TimeSpan(12, 59, 59);
}
When I update Syncfusion.Blazor to the version below 19.1.0.57, the index.razor page work fine.
But when I update Syncfusion.Blazor to version 19.1.0.57 and above (including 19.1.0.57), the index.razor page throw an exception (see "SfTimePicker Exception.txt" in the attached compressed file).
[Question]
For the SfTimePicker component, can I still declare TValue as TimeSpan, or can I only use the DateTime type?

Attachment: SfTimePicker_Exception_75e39a3a.zip

8 Replies 1 reply marked as answer

BC Berly Christopher Syncfusion Team May 11, 2021 02:45 PM UTC

Hi Vulcan, 
  
Greetings from Syncfusion support. 
  
Currently we are working on the reported issue. So, we will check and update the further details in two business days (13th May 2021). 
  
Regards. 
Berly B.C 



BC Berly Christopher Syncfusion Team May 12, 2021 11:10 AM UTC

Hi Vulcan lee, 
  
As per C# TimeSpan standard, the timespan not accept the “HH:mm” format, so the reported issue is occurred. So, we suggest you to define the format as mentioned below to get rid of the reported issue. 
  
@using Syncfusion.Blazor.Calendars 
 
 
<SfTimePicker TValue="TimeSpan" @bind-Value="myTime" Format="@("hh\\:mm\\:ss")"></SfTimePicker> 
 
@code { 
    TimeSpan myTime = new TimeSpan(12, 59, 59); 
} 
 
  
  
Regards, 
Berly B.C 


Marked as answer

VL vulcan lee May 12, 2021 01:01 PM UTC

Thanks for your help, this solution working fine.


BC Berly Christopher Syncfusion Team May 12, 2021 03:58 PM UTC

Hi Vulcan lee, 
  
Most welcome. Please let us know if you need further assistance on this.  
  
Regards, 
Berly B.C 



DA Daniel October 11, 2021 06:57 PM UTC

After I updated Syncfusion version

using this format:

<SfTimePicker TValue="TimeSpan" @bind-Value="escritorioHorario.HorarioInicial" Format="@("hh\\:mm")" AllowEdit="false"></SfTimePicker>


I can no longer specify a time beyond 12:30


It looks like it's behaving like an 12h format (AM and PM) but it's set to 24h format (pt-BR culture)




BC Berly Christopher Syncfusion Team October 12, 2021 05:04 PM UTC

Hi Daniel, 

We were able to reproduce the reported issue at our end. We will validate and update the further details on tomorrow (13th October 2021). 

Regards, 
Berly B.C 



BC Berly Christopher Syncfusion Team October 13, 2021 02:25 PM UTC

Hi Vulcan lee, 

Thanks for the patience. 

We have confirmed the reported issue as a bug at our end and this fix will be included in our weekly patch release scheduled on 26th October 2021. You can track the status of the reported issue from the below feedback link. 


Regards, 
Berly B.C 



BC Berly Christopher Syncfusion Team November 16, 2021 07:10 AM UTC

Hi Vulcan, 
  
Thanks for being patience. 


 
We are glad to announce that our service pack release v19.3.47 has been rolled out successfully. The reported bug with “While changing value in the TimePicker input manually, the value will not goes beyond 12:59” has been fixed in this release. As a result, we recommend you upgrade to the latest version of our Syncfusion package to avail this fix. 


 
Kindly check the reported defect in the latest version and get back to us if you need any further assistance. 
 
  
 


  
Regards, 
Berly B.C 


Loader.
Up arrow icon