Skip to content

Commit

Permalink
Fix setting "NavigationUpperBound" and "NavigationLowerBound" also se…
Browse files Browse the repository at this point in the history
…tting "NavigatedDate" to the new value (#176)
  • Loading branch information
ME-MarvinE committed Jan 25, 2024
2 parents 821826a + e292a43 commit 8462aaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XCalendar.Core/Models/Calendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ private void OnStartOfWeekChanged(DayOfWeek oldValue, DayOfWeek newValue)
}
private void OnNavigationLowerBoundChanged(DateTime oldValue, DateTime newValue)
{
NavigatedDate = CoerceNavigatedDate(newValue);
NavigatedDate = CoerceNavigatedDate(NavigatedDate);

//Days are already updated if the coerced value is different from the new value.
if (NavigatedDate == newValue)
Expand All @@ -851,7 +851,7 @@ private void OnNavigationLowerBoundChanged(DateTime oldValue, DateTime newValue)
}
private void OnNavigationUpperBoundChanged(DateTime oldValue, DateTime newValue)
{
NavigatedDate = CoerceNavigatedDate(newValue);
NavigatedDate = CoerceNavigatedDate(NavigatedDate);

//Days are already updated if the coerced value is different from the new value.
if (NavigatedDate == newValue)
Expand Down

0 comments on commit 8462aaa

Please sign in to comment.