k06a / ABCalendarPicker

Fully configurable iOS calendar UI component with multiple layouts and smooth animations.
MIT License
710 stars 119 forks source link

Limit number of rows shown in calendar #2

Closed ChrisJCraft closed 11 years ago

ChrisJCraft commented 11 years ago

It would be a great feature enhancement if the ABCalendarPicker calendar supported showing only 3 weeks of the month at a time and allowed you to swipe up and down to move through time.

You have this feature for 1 week, making it for 3 would be a perfect fit to leave room for list of events, etc. below.

In some months like 2012.09, there are as many as six weeks shown. And if the app has a title bar and a tab bar then in that case there is only room one event detail row below.

I think developers would love this feature and end users.

k06a commented 11 years ago

There are 2 solutions to decrease calendar height:

  1. Reduce number of rows
  2. Decrease rows height

Reduce number of row this is what you talk about. There is another second way. Now all cells are square (height is equal to width). It is possible to add coefficient, witch will be height/width. And you will be able to decrease week height by 20-30%...

But if you doesn't like this way, how would you like to name 3 weeks? "20-23 weeks"?

ChrisJCraft commented 11 years ago

Hi K06a,

You are right, about decreasing row height. But calendar looks great with squares, I'd hate to loose the matching style to the default iOS calendar.

Maybe call it "3 week view", nice thing is you get to see most of the month, and still have enough room to still swipe, etc.

Impressive work by the way!

k06a commented 11 years ago

I think it will be a problem to identify month if it will be no month name in title.

What did you mean exactly?

  1. UIScrollView with 3 of 4-6 rows visible
  2. Real ABCalendarPickerViewThreeWeekDateProvider?
  3. Just existing ABCalendarPickerViewWeekDateProvider with week before and week after?
k06a commented 11 years ago

Just implemented third variant. Is it what you mean? And I really like it, try it in Demo! Thanks for suggestion!

k06a commented 11 years ago

Here is demo: http://youtu.be/1B0X4Zqy8QY

UPDATED: Link fixed

k06a commented 11 years ago

I am closing this issue. If you would like to discuss - just open new issue :)