From 4c910acf6680e26673c2c9d11b07d541269d75d5 Mon Sep 17 00:00:00 2001 From: Hannes Tribus Date: Thu, 24 Mar 2016 21:32:39 +0100 Subject: [PATCH] Bugfix #71 --- README.md | 1 + THCalendarDatePicker.podspec | 2 +- THCalendarDatePicker/THDatePickerViewController.m | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 05774c6..fada68d 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/THCalendarDatePicker.podspec b/THCalendarDatePicker.podspec index 6254eda..aa4df85 100644 --- a/THCalendarDatePicker.podspec +++ b/THCalendarDatePicker.podspec @@ -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' } diff --git a/THCalendarDatePicker/THDatePickerViewController.m b/THCalendarDatePicker/THDatePickerViewController.m index 035891d..7a60bd0 100755 --- a/THCalendarDatePicker/THDatePickerViewController.m +++ b/THCalendarDatePicker/THDatePickerViewController.m @@ -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 { @@ -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 {