how to highlight selected date in calendar, if user has already selected specific date from calendar
Provided YYCalendar pod works me and its easy to implement. Need to implement the one more feature in my project to show the selected day in calendar. Kindly guide ....
In Normalcalender.swift file Please replace with below code.
public init(langType type: LangType, date: String, format: String, completion selectHandler: @escaping SelectHandler) { super.init(nibName: nil, bundle: nil) self.langType = type self.dateFormat = format self.inquiryDate = Useful.stringToDate(date, format: self.dateFormat)! self.selectHandler = selectHandler self.setupLangType() self.selectedDate = date let selctedDateData = selectedDate?.toDateFormat(withFormat:"yyyy/MM/dd") let dateData = selctedDateData ?? Date() let calendar = Calendar.current let components = calendar.dateComponents([.year,.month,.day,.weekday], from: dateData) todayYear = components.year! todayDay = components.day! print(todayDay) todayMonth = components.month! self.setupDate()
}