JTAppleCalendar icon indicating copy to clipboard operation
JTAppleCalendar copied to clipboard

didDeselect not called

Open syedrazackimran opened this issue 6 years ago • 6 comments

(Required) Version Number: latest version

Description

I need a single selection calendar. before it's works fine once I update a pod. i facing problem kindly do needfully

Steps To Reproduce

                calendarView.allowsMultipleSelection = false
                calendarView.allowsRangedSelection = false

Expected Behavior

Additional Context

syedrazackimran avatar Oct 03 '19 10:10 syedrazackimran

because you need to rename your didSelect and didDeselect funcitons. Check here to see all the functions you need to rename in the in migration guide

patchthecode avatar Oct 03 '19 10:10 patchthecode

closing issue. Do let me know if youre still stuck

patchthecode avatar Oct 03 '19 10:10 patchthecode

yes already changed still it's not calling

    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {
        if isMultiSelection {
            calendar.deselectAllDates(triggerSelectionDelegate: false)
            selectedDates.removeAll()
            if !isRangeSelected {
                checkIn = date
            } else {
                checkIn = date
                checkOut = nil
                isRangeSelected = false
            }
            if let checkIn_date = checkIn {
                lbl_return_date.text = "dd MMM"
                lbl_return_day.text = "EEEE"
                dateFormatter.dateFormat = "dd MMM"
                lbl_departure_date.text = dateFormatter.string(from: date)
                dateFormatter.dateFormat = "EEEE"
                lbl_departure_day.text = dateFormatter.string(from: date)
                calendar.selectDates([checkIn_date], triggerSelectionDelegate:false, keepSelectionIfMultiSelectionAllowed: true)
            }
        } else {
            configurationCell(cell: cell, state: cellState)
        }
    }

syedrazackimran avatar Oct 04 '19 01:10 syedrazackimran

are you able to provide me with a sample code? [email protected]

i'll be able to take a look over the weekend.

patchthecode avatar Oct 04 '19 14:10 patchthecode

closing issue again until user responds. Setting the awaiting-response flag.

patchthecode avatar Oct 19 '19 11:10 patchthecode

here I attached my sample project, RangeSelection with custom Cell

untitled folder.zip

syedrazackimran avatar Oct 22 '19 03:10 syedrazackimran