Skip to content

Commit

Permalink
chore: set default time ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal22shah committed Dec 2, 2024
1 parent 4eb29e2 commit d2b2d95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private async Task When_Native_Flyout_Theme(UIKit.UIUserInterfaceStyle expectedS
public async Task When_Time_Uninitialized_Should_Display_Current_Time()
{
var timePicker = new Microsoft.UI.Xaml.Controls.TimePicker();
timePicker.Time = new TimeSpan(-1);
timePicker.Time = new TimeSpan(TimePicker.DEFAULT_TIME_TICKS);

var expectedCurrentTime = GetCurrentTime();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ partial class NativeTimePickerFlyout

internal protected override void Open()
{
if (Time.Ticks == -1)
if (Time.Ticks == TimePicker.DEFAULT_TIME_TICKS)
{
Time = GetCurrentTime();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void onUnload(object sender, RoutedEventArgs e)

protected internal override void Open()
{
if (Time.Ticks == -1)
if (Time.Ticks == TimePicker.DEFAULT_TIME_TICKS)
{
Time = GetCurrentTime();
}
Expand Down
2 changes: 2 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/TimePicker/TimePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ namespace Microsoft.UI.Xaml.Controls;
[ContentProperty(Name = nameof(Header))]
public partial class TimePicker : Control
{
internal const long DEFAULT_TIME_TICKS = -1;

}

0 comments on commit d2b2d95

Please sign in to comment.