Skip to content

Commit

Permalink
Fixed few bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
k06a committed Feb 24, 2013
1 parent c674fc7 commit 248570a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 9 additions & 2 deletions ABCalendarPicker/ABCalendarPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,12 @@ - (void)tapDetected:(UITapGestureRecognizer *)recognizer
needScrollNext = ([date compare:mainDateEnd] > 0);
}

if (!control.enabled && !needScrollPrev && !needScrollNext)
{
needScrollPrev = YES;
needScrollNext = YES;
}

if (!needScrollPrev && !needScrollNext)
{
if (!control.highlighted)
Expand Down Expand Up @@ -517,11 +523,12 @@ - (void)tapDetected:(UITapGestureRecognizer *)recognizer
else
{
// Lets segue prev or next

self.highlightedDate = date;

ABCalendarPickerAnimation animation;
if (needScrollPrev)
if (needScrollPrev && needScrollNext)
animation = ABCalendarPickerAnimationTransition;
else if (needScrollPrev)
animation = [self.currentProvider animationForPrev];
else if (needScrollNext)
animation = [self.currentProvider animationForNext];
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ Here are two videos, short and long. Short video shows component features. Long

ABCalendarPicker short demo: [http://youtu.be/d2PGFiO_jk4](http://youtu.be/d2PGFiO_jk4)

ABCalendarPicker 3 weeks mode: [http://youtu.be/q2_PsnBsXeU
](http://youtu.be/q2_PsnBsXeU
)
ABCalendarPicker 3 weeks mode: [http://youtu.be/1B0X4Zqy8QY
](http://youtu.be/1B0X4Zqy8QY)

Mr.Calendario long demo: [http://youtu.be/Hz3D4Q5CDuQ](http://youtu.be/Hz3D4Q5CDuQ)

Expand Down

0 comments on commit 248570a

Please sign in to comment.