MudTimePicker: Clear text that failed to convert

Merged
DA
3mo ago
+60-1

SetTimeAsync gated its whole body on the time changing, so assigning null while the time was already null did nothing. Text that failed to convert leaves the time null, which made that exact case unreachable: the bad text stayed on screen and neither Time = null nor ClearAsync could remove it.

This mirrors the guard MudDatePicker has carried since #7866, using the IsNullOrEmpty spelling settled in #13665. ResetConverterErrors is called on the same path — MudTimePicker never called it anywhere — so a stale conversion error no longer outlives the text that caused it.

For review: TimeSpanConverter converts null to string.Empty where the date converter yields null, so a cleared time picker reports Text as "". A test copied from the MudDatePicker equivalent would fail on that difference; the assertion here carries a comment saying why.

Same decision as https://github.com/MudBlazor/MudBlazor/pull/13667 for MudDateRangePicker — if the pattern is wrong in one, it should come out of both.