Skip to content

Commit

Permalink
Bugfix #71
Browse files Browse the repository at this point in the history
  • Loading branch information
hons82 committed Mar 24, 2016
1 parent 915b2fd commit 4c910ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ or how you could do it in Swift
- Fixed issue [#28](https://github.com/hons82/THCalendarDatePicker/issues/28)
- Fixed issue [#30](https://github.com/hons82/THCalendarDatePicker/issues/30)
- Fixed issue [#69](https://github.com/hons82/THCalendarDatePicker/issues/69)
- Fixed issue [#71](https://github.com/hons82/THCalendarDatePicker/issues/71)
- Pull request [#40](https://github.com/hons82/THCalendarDatePicker/pull/40)
- Pull request [#41](https://github.com/hons82/THCalendarDatePicker/pull/41)
- Pull request [#53](https://github.com/hons82/THCalendarDatePicker/pull/53)
Expand Down
2 changes: 1 addition & 1 deletion THCalendarDatePicker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "THCalendarDatePicker"
s.version = "1.2.6"
s.version = "1.2.7"
s.summary = "A DatePicker based on a custom calendar view"
s.homepage = "https://github.com/hons82/THCalendarDatePicker"
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
Expand Down
6 changes: 4 additions & 2 deletions THCalendarDatePicker/THDatePickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ +(THDatePickerViewController *)datePicker {
}

-(void)setAllowMultiDaySelection:(BOOL)allow {
[self setAutoCloseOnSelectDate:!allow]; // Caution possible endless loop
_allowMultiDaySelection = allow;
if (_allowMultiDaySelection)
[self setAutoCloseOnSelectDate:!allow]; // Caution possible endless loop
}

- (void)setAllowClearDate:(BOOL)allow {
Expand All @@ -120,8 +121,9 @@ - (void)setClearAsToday:(BOOL)beTodayButton {
- (void)setAutoCloseOnSelectDate:(BOOL)autoClose {
if (!_allowClearDate)
[self setAllowClearDate:!autoClose];
_allowMultiDaySelection = !autoClose;
_autoCloseOnSelectDate = autoClose;
if (_autoCloseOnSelectDate)
_allowMultiDaySelection = NO;
}

- (void)setDisableHistorySelection:(BOOL)disableHistorySelection {
Expand Down

0 comments on commit 4c910ac

Please sign in to comment.