CalendarKit icon indicating copy to clipboard operation
CalendarKit copied to clipboard

Month View

Open AdoptedChildOfGod opened this issue 3 years ago • 5 comments

I needed a native-looking calendar to display both day views and month views. Calendar kit is perfect for day view but doesn't have an option to display the month view so I've created one. The regular DayViewController works as it did before. There is now a MonthViewController as well that does the same things but displays a month calendar view at the top instead of the bar of the days in the week. There is also a hybrid DayOrMonthViewController that can toggle seamlessly between the two headers when the function toggleDayMonthButtonTapped() is called.

AdoptedChildOfGod avatar Jun 02 '21 18:06 AdoptedChildOfGod

Hi, thanks for creating this pull request. First of all, it doesn't compile, could you please fix the compilation issues?

Overall, I think this can't go to the CK repository itself, as I try to keep it minimal, but this could be the case for CK derivative product/library. Is it possible for you to structure the code in a way that it will depend on CalendarKit and be a separate package? No need to do this right now, but we can discuss it after I'll be able to run your project.

richardtop avatar Jun 02 '21 19:06 richardtop

Has this been merged. Also need month view. Maybe I'm not understanding is CalendarKit just a DayView?

justdan0227 avatar Oct 04 '21 15:10 justdan0227

  1. No, this hasn't been merged
  2. Yes, at this stage CK is just a DayView + it's components, so you can create your own version of the DayView. There are plenty of libraries which handle the Month / Year views.

richardtop avatar Oct 04 '21 18:10 richardtop

@richardtop can you suggest some that work with CalendarKit. Really love it but need a month view that reflects the event count on each day. Was thinking that CK would do this vs just showing the dayview (which is awesome)

justdan0227 avatar Oct 05 '21 15:10 justdan0227

Pretty much any of the Month View libraries should work with CalendarKit, so it's better to evaluate yourself what would work for your codebase best. It's not a problem for CK to have a Month View, but it has to be: a) very flexible as DayView b) Integrate with DayView (e.g. have a simple way to configure both Day & Month views, have a similar API) c) Be of a very high caliber compared to what's on the market right now.

For example, this pull request, while good, is too specialized, so I think in the current shape it's best to have it as a separate package that depends on CalendarKit.

As for the month view suggestions, these might be of interest: https://github.com/airbnb/HorizonCalendar https://github.com/WenchaoD/FSCalendar

richardtop avatar Oct 05 '21 17:10 richardtop