8000 calendarView setAvailableDates function taking long time to load calendar view · Issue #71 · Vodolazkyi/VACalendar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
calendarView setAvailableDates function taking long time to load calendar view #71
Open
@seekingdesti

Description

@seekingdesti

Hi,

I have 5 years dates in calendar, it's taking very long time to load calendar view.
I i am using below function to load 5 years dates.

let avlblDates = datesRange(from: 01.01.2019, to: Date())
calendarView.setAvailableDates(DaysAvailability.some(avlblDates))

private func datesRange(from: Date, to: Date) -> [Date] {
if from > to { return Date }
var tempDate = from
var array = [tempDate]

    while tempDate < to {
        tempDate = Calendar.current.date(byAdding: .day, value: 1, to: tempDate)!
        array.append(tempDate)
    }
    return array
}


Please help me on this as it takes upto 10 seconds to load calendar view.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0