We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xcode:11.5 swift:5
self.calendarView = CalendarView() self.calendarView?.frame = CGRect(x: 0, y: HT_StatusBarAndNavigationBarHeight, width: KScreenWidth, height: 200) calendarView?.dataSource = self calendarView?.delegate = self calendarView?.marksWeekends = true calendarView?.direction = .horizontal calendarView?.setDisplayDate(Date()) view.addSubview(self.calendarView!)
The text was updated successfully, but these errors were encountered:
//MARK: - calendarDelegate func startDate() -> Date {
var dateComponents = DateComponents() dateComponents.month = -1 let today = Date() let threeMonthsAgo = self.calendarView?.calendar.date(byAdding: dateComponents, to: today)! return threeMonthsAgo! } func endDate() -> Date { var dateComponents = DateComponents() dateComponents.month = 12 let today = Date() let twoYearsFromNow = self.calendarView?.calendar.date(byAdding: dateComponents, to: today)! return twoYearsFromNow! } func calendar(_ calendar: CalendarView, didScrollToMonth date: Date) { } func calendar(_ calendar: CalendarView, didDeselectDate date: Date) { } func headerString(_ date: Date) -> String? { return "标题" } func calendar(_ calendar: CalendarView, didSelectDate date: Date, withEvents events: [CalendarEvent]) { } func calendar(_ calendar: CalendarView, canSelectDate date: Date) -> Bool { return false } func calendar(_ calendar: CalendarView, didLongPressDate date: Date, withEvents events: [CalendarEvent]?) { }
Sorry, something went wrong.
No branches or pull requests
xcode:11.5
swift:5
The text was updated successfully, but these errors were encountered: