richardtop / CalendarKit

📅 Calendar for Apple platforms in Swift
https://www.youtube.com/watch?v=cJ63-_z1qg8
MIT License
2.49k stars 334 forks source link

Open calendar on click header label "Wednesday, April 7, 2021" #302

Closed kumarkundan75 closed 3 years ago

kumarkundan75 commented 3 years ago

Hi @richardtop ! I want to open calendar on click SwipeLabelView that help user to select date from calendar and move to selected date.

There is any solution to this?

richardtop commented 3 years ago

Hi, there is no solution for this out of the box. I suggest you doing the following to implement your idea:

  1. Fork CK
  2. Create your own version of SwipeLabelView, add gesture recognizers to it to handle the interaction
  3. Add other code needed to handle the result, e.g. in your subclass of the DayViewController.

To simplify updates, I suggest creating a different class, e.g. MySwipeLabel and modify as little files as possible, so that you could easier apply changes from the upstream.

jakmalof commented 3 years ago

@kumarkundan75 Were you able to figure out a solution to this? I am trying to do something similar by having the calendar start by displaying a specific date instead of whatever the current date is.