Blazor WASM input time fails to show values after upgrade to .NET 5
See original GitHub issueThis issue has been moved from a ticket on Developer Community.
[severity:It’s more difficult to complete my work] [regression] [worked-in:3.1] I have a Blazor WASM project that I just have upgraded to .NET 5. After upgrade my input time:
@code{
DateTime myTime = DateTime.Now.ToLocalTime();
string myTimeFormat = "HH:mm:ss";
}
only shows “–:–” instead of the time on the format “HH:mm:ss” that it used to do.
Chrome (and Edge) console prints.
blazor.webassembly.js:1 The specified value “12.52.58” does not conform to the required format. The format is “HH:mm”, “HH:mm:ss” or “HH:mm:ss.SSS” where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.
I posted this as question on SO
Original Comments
Feedback Bot on 2/19/2021, 07:18 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (4 by maintainers)

Top Related StackOverflow Question
In my opinion Blazor WASM works correctly (binding to
input type="time") and this issue can be closed.Unfortunately there are some differences in culture definitions in various environments (Windows 10, Windows Server, Linux, WASM). What is the moral of the story? Whenever you exchange data between different systems, you must use culture-independent date, time, and number formatting, even if you are sure that both systems are set to the same culture.
@erikthysell run this code to understand the difference between culture dependent and culture independent formatting.