Skip to content

Wrong selected date #252

@onurays

Description

@onurays

Version: 6.0

screen shot 2017-01-02 at 14 04 27

Selected Date: (Date) $R0 = 2017-01-09 22:00:00 UTC

    func calendar(_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleDayCellView?, cellState: CellState) {
        handleCellTextColor(view: cell, cellState: cellState)
        handleCellSelection(view: cell, cellState: cellState, date: date, isSelectionEvent: true)
    }

Here is my configuration and the problem occurs even if I don't set a timezone.

 func configureCalendar(_ calendar: JTAppleCalendarView) -> ConfigurationParameters {
        var calendar = Calendar.current
        calendar.timeZone = TimeZone(secondsFromGMT: NSTimeZone.local.secondsFromGMT())!
        return ConfigurationParameters(startDate: startDate!, endDate: endDate!, numberOfRows: 6, calendar: calendar, generateInDates: .forAllMonths, generateOutDates: .tillEndOfGrid, firstDayOfWeek: .monday)
 }

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions