richardtop / CalendarKit

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

Current time indicator for all dates. #358

Closed littlehj closed 1 year ago

littlehj commented 1 year ago

The current time indicator, which shows the current time, is only displayed if it is today. It would be a nice option for CalendarKit if it could be improved to be visible on all dates.

CleanShot 2023-05-27 at 20 27 57@2x

Thanks.

richardtop commented 1 year ago

Could you please elaborate on your idea? Do you propose to have an option to show current time even for e.g. yesterday or any other day in the past/future? Which color should that indicator have?

Currently it just mimics the default Calendar app behavior, which is to show it just for "today".

littlehj commented 1 year ago

Currently, the time indicator is only shown if it is today, like the default Calender app. However, I realized that it would be much more helpful to show the current time when adjusting past or future events. I'm suggesting this because I think such a time indicator would be a good UI reference for users when adding new events or modifying existing ones.

richardtop commented 1 year ago

I suggest you modifying the library (forking) and then adjusting the logic of hiding that time indicator. e.g. you might change the color of the indicator for other dates than today, the relevant code is here: https://github.com/richardtop/CalendarKit/blob/master/Sources/Timeline/TimelineView.swift#L382

littlehj commented 1 year ago

I suggest you modifying the library (forking) and then adjusting the logic of hiding that time indicator. e.g. you might change the color of the indicator for other dates than today, the relevant code is here: https://github.com/richardtop/CalendarKit/blob/master/Sources/Timeline/TimelineView.swift#L382

Thanks,

richardtop commented 1 year ago

Were you able to achieve the result you intended? Can this ticket be closed?

littlehj commented 1 year ago

YES. Thanks for great support.