Skip to content
New issue

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

weekdayHeaderEnabled not working #106

Closed
ykphuah opened this issue Dec 17, 2018 · 2 comments
Closed

weekdayHeaderEnabled not working #106

ykphuah opened this issue Dec 17, 2018 · 2 comments

Comments

@ykphuah
Copy link

ykphuah commented Dec 17, 2018

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)
@ykphuah
Copy link
Author

ykphuah commented Jan 1, 2019

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)

@ykphuah
Copy link
Author

ykphuah commented Jan 5, 2019

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

self.navigationController?.navigationBar.isTranslucent = false

@ykphuah ykphuah closed this as completed Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant