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

Localization issue #76

Closed
evgenijromanishyn opened this issue Apr 5, 2019 · 1 comment
Closed

Localization issue #76

evgenijromanishyn opened this issue Apr 5, 2019 · 1 comment

Comments

@evgenijromanishyn
Copy link

evgenijromanishyn commented Apr 5, 2019

Everything is perfect.
The name of the month is not correct in Russian. I can not change the title, this is a private method.
To display the title correctly, I recommend using something like this:

func displayDateOnHeader(_ date: Date) {
        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = "LLLL yyyy"
        self.headerView.monthLabel.text = dateFormatter.string(from: date)
        
        self.displayDate = date
}
@mmick66
Copy link
Owner

mmick66 commented Aug 7, 2019

This is provided for in:

public protocol CalendarViewDataSource {
    func startDate() -> Date
    func endDate() -> Date
    /* optional */
    func headerString(_ date: Date) -> String?
}

If you implement the headerString method you can return a custom string according to the date passed.

@mmick66 mmick66 closed this as completed Aug 7, 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

2 participants