feat: fix ampm auto derivation.

This commit is contained in:
rabbitism
2024-04-27 15:08:57 +08:00
parent af3b343550
commit 0e00158baf
3 changed files with 10 additions and 4 deletions

View File

@@ -118,6 +118,7 @@ public class TimePicker : TemplatedControl, IClearControl, IInnerContentControl,
public void Clear()
{
Focus(NavigationMethod.Pointer);
_presenter?.SetValue(TimePickerPresenter.TimeProperty, null);
}
@@ -170,6 +171,7 @@ public class TimePicker : TemplatedControl, IClearControl, IInnerContentControl,
private void OnButtonClick(object? sender, RoutedEventArgs e)
{
Focus(NavigationMethod.Pointer);
SetCurrentValue(IsDropdownOpenProperty, !IsDropdownOpen);
}
@@ -244,6 +246,7 @@ public class TimePicker : TemplatedControl, IClearControl, IInnerContentControl,
{
_presenter?.Confirm();
SetCurrentValue(IsDropdownOpenProperty, false);
TopLevel.GetTopLevel(this);
Focus();
}