Skip to content

Commit

Permalink
Fix crash with big minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
hughbe committed Mar 2, 2018
1 parent d971d47 commit 312caa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DayDatePicker/Classes/TimePickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class TimePickerView : UIControl {
time = minTime
}

time.minute = time.minute.round(toNearest: minuteInterval)
time.minute = max(0, min(55, time.minute.round(toNearest: minuteInterval)))
let reloadMinuteTableView = time.hour != _time.hour
_time = time

Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- DayDatePicker (1.4)
- DayDatePicker (1.5)
- FBSnapshotTestCase (2.1.4):
- FBSnapshotTestCase/SwiftSupport (= 2.1.4)
- FBSnapshotTestCase/Core (2.1.4)
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
DayDatePicker: 790c99966f31f65496ec0f26a2f0bc25036bb923
DayDatePicker: a1449d5a2a4abace9c0c9c702eb751f66649236b
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a

PODFILE CHECKSUM: 69fcf032d21f0c566bbf962e2e8c2116500e1eda
Expand Down

0 comments on commit 312caa3

Please # to comment.