Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UWP Renderer] Update min/max handling for inputs #8236

Merged
merged 9 commits into from
Feb 23, 2023
6 changes: 3 additions & 3 deletions source/uwp/SharedRenderer/lib/InputValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ namespace winrt::AdaptiveCards::Rendering::Xaml_Rendering
if (max)
{
double maxDouble = max.Value();
isValid = (currentDouble <= maxDouble);
isValid &= (currentDouble <= maxDouble);
}

if (min)
{
double minDouble = min.Value();
isValid = (currentDouble >= minDouble);
isValid &= (currentDouble >= minDouble);
}
}
catch (...)
Expand Down Expand Up @@ -278,7 +278,7 @@ namespace winrt::AdaptiveCards::Rendering::Xaml_Rendering
unsigned int minHours, minMinutes;
if (::AdaptiveCards::DateTimePreparser::TryParseSimpleTime(minTimeStdString, minHours, minMinutes))
{
winrt::TimeSpan minTime{(int64_t)(minHours * 60 + minMinutes) * 1000000 * 60};
winrt::TimeSpan minTime{(int64_t)(minHours * 60 + minMinutes) * 10000000 * 60};
isMaxMinValid &= currentTime.count() >= minTime.count();
}
}
Expand Down