Skip to content

Commit

Permalink
Merge pull request #387 from beset/master
Browse files Browse the repository at this point in the history
When the newly set presentedDate equals to the old presentedDate, presentedDate don’t update
  • Loading branch information
Jonas-Taha El Sesiy committed Nov 27, 2016
2 parents 475357d + b46b2e1 commit 169be0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CVCalendar/CVCalendarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public final class CVCalendarView: UIView {
public var presentedDate: CVDate! {
didSet {
if let _ = oldValue {
delegate?.presentedDateUpdated?(presentedDate)
if presentedDate.convertedDate(calendar: Calendar.current) != oldValue.convertedDate(calendar: Calendar.current) {
delegate?.presentedDateUpdated?(presentedDate)
}
}
}
}
Expand Down

0 comments on commit 169be0b

Please sign in to comment.