Skip to content

Commit

Permalink
Fix selecting new date if month is the same but the year is different
Browse files Browse the repository at this point in the history
  ShouldSelectNextWeekOnMonthChange3
  • Loading branch information
punker76 committed Dec 7, 2016
1 parent d7b186b commit cc50389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MONI/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public void SelectDate(DateTime date)
{
this.CreateAndLoadYear(date.Year);
}
if (this.workMonth == null || date.Month != this.workMonth.Month)
if (this.workMonth == null || date.Year != this.workMonth.Year || date.Month != this.workMonth.Month)
{
this.WorkMonth = this.WorkYear.Months.ElementAt(date.Month - 1);
this.WorkMonth.CalcPreviewHours();
Expand Down

0 comments on commit cc50389

Please sign in to comment.