jivesoftware / PDTSimpleCalendar

A simple Calendar / Date Picker for iOS using UICollectionView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weekdayHeaderEnabled not working

ykphuah opened this issue · comments

Saw #86 , but still doesn't work for me, adding the edgesForExtendedLayout = [] make the appbar gray, that's all.

controller.firstDate = Date().subtract(years: 1)
controller.lastDate = Date().add(years: 3)
controller.selectedDate = self.value
controller.scroll(to: self.value ?? Date(), animated: true)
controller.weekdayHeaderEnabled = true
controller.weekdayTextType = .short
controller.edgesForExtendedLayout = []
controller.delegate = self.delegate
cell.formViewController()?.navigationController?.pushViewController(controller, animated: true)

I managed to get the header to show, but the appbar is still gray, by rearranging the weekdayHeaderEnabled setting to before the selectedDate setter.

controller.firstDate = Date().subtract(years: 1)
controller.lastDate = Date().add(years: 3)
controller.weekdayHeaderEnabled = true
controller.weekdayTextType = .short
controller.edgesForExtendedLayout = []
controller.selectedDate = self.value
controller.scroll(to: self.value ?? Date(), animated: true)
controller.delegate = self.delegate
cell.formViewController()?.navigationController?.pushViewController(controller, animated: true)

Finally managed to solve the gray appbar issue with the following in the viewDidLoad

self.navigationController?.navigationBar.isTranslucent = false