CVCalender disable autoDate selection when swipe months iOS swift

Solution:

When using the CVCalender in pods try the below steps to avoid the auto date selection.

1)Search in your project workspace using the below keyword "matchedMonths".

2) In
CVCalendarMonthContentViewController find the below lines

if matchedMonths(current, presented) {
                    selectDayViewWithDay(current.day, inMonthView: presentedMonthView)
                } else {
                    selectDayViewWithDay(CVDate(date: calendarView.manager
                        .monthDateRange(presentedMonthView.date).monthStartDate, calendar: calendar).day,
                                         inMonthView: presentedMonthView)
                }


and change the lines to 


                if matchedMonths(current, presented) {
//                    selectDayViewWithDay(current.day, inMonthView: presentedMonthView)
                } else {
//                    selectDayViewWithDay(CVDate(date: calendarView.manager
//                        .monthDateRange(presentedMonthView.date).monthStartDate, calendar: calendar).day,
//                                         inMonthView: presentedMonthView)
                }

Then it will works good...


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift