You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problem if I selected day and print this I have date with - 1 day
Problem is when I change firstDayOfWeak, when is default is good.
On the start ViewController I selected currentDay and calendar selected currently date
let currentDateString = formatter.string(from: Date())
let cellStateDateString = formatter.string(from: cellState.date)
if currentDateString == cellStateDateString {
validCell.dataLabel.textColor = selectedMounthColor
validCell.selectedView.backgroundColor = UIColor.blue
}
Version 7.1.5
Swift 4
Tested on iPhone X (no on simulator)
My code:
func configureCalendar(_ calendar: JTAppleCalendarView) -> ConfigurationParameters {
calendarView.scrollToDate(Date(), animateScroll: false)
testCalendar.timeZone = Calendar.current.timeZone
testCalendar.locale = Calendar.current.locale
self.formatter.dateFormat = "yyyy MM dd"
self.formatter.timeZone = Calendar.current.timeZone
self.formatter.locale = Calendar.current.locale
let startDate = formatter.date(from: "2017 01 01")
let endDate = formatter.date(from: "2100 12 28")
let firstDayOfWeek: DaysOfWeek = .monday // when I don't set value .monday calendar selected currently date
let parametrs = ConfigurationParameters(startDate: startDate!,
endDate: endDate!,
calendar: testCalendar,
firstDayOfWeek: firstDayOfWeek)
return parametrs
}
I have problem if I selected day and print this I have date with - 1 day
Problem is when I change firstDayOfWeak, when is default is good.
On the start ViewController I selected currentDay and calendar selected currently date
Version 7.1.5
Swift 4
Tested on iPhone X (no on simulator)
My code:
The text was updated successfully, but these errors were encountered: