Skip to content

Commit

Permalink
fix: use proper calendar to calculate next month for weekview (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
xPutnikx authored and Jonas-Taha El Sesiy committed Dec 13, 2018
1 parent 8ca623a commit f9157ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CVCalendar/CVCalendarWeekContentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ extension CVCalendarWeekContentViewController {

components.month! += 1

let newDate = Calendar.current.date(from: components)!
let newDate = calendar.date(from: components)!
let monthView = MonthView(calendarView: calendarView, date: newDate)
let frame = CGRect(x: 0, y: 0, width: scrollView.bounds.width,
height: scrollView.bounds.height)
Expand All @@ -387,7 +387,7 @@ extension CVCalendarWeekContentViewController {

components.month! -= 1

let newDate = Calendar.current.date(from: components)!
let newDate = calendar.date(from: components)!
let monthView = MonthView(calendarView: calendarView, date: newDate)
let frame = CGRect(x: 0, y: 0, width: scrollView.bounds.width,
height: scrollView.bounds.height)
Expand Down

0 comments on commit f9157ee

Please sign in to comment.