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

Starting month display #3

Closed
aldertc opened this issue May 16, 2016 · 5 comments
Closed

Starting month display #3

aldertc opened this issue May 16, 2016 · 5 comments

Comments

@aldertc
Copy link

aldertc commented May 16, 2016

Not really an issue but a request for having an option to select the calendar display start month. So currently I have it in my app with 6 months history but at the moment the calendar starts by displaying the very first month when I would rather have it always start with the current month and then I can choose to page back 6 months.

Is this something you could easily add to your code or have a suggestion as how best to achieve? I have played around trying to use 'scrollToItemAtIndexPath' but with no success so any help would be gratefully appreciated.

Many thanks,

Carl

@mmick66
Copy link
Owner

mmick66 commented May 20, 2016

Did you try?
func setDisplayDate(date : NSDate, animated: Bool)

@aldertc
Copy link
Author

aldertc commented May 20, 2016

How do I access that function as its not in any of the code?

@mmick66
Copy link
Owner

mmick66 commented May 23, 2016

It is used in the example when setting the date picker at the bottom, look at the ViewController.swift

@IBAction func onValueChange(picker : UIDatePicker) {
    self.calendarView.setDisplayDate(picker.date, animated: true)
}

@mmick66 mmick66 closed this as completed May 23, 2016
@aldertc
Copy link
Author

aldertc commented May 24, 2016

Thanks - turns out I had an older version downloaded which didn't have that functionality. Since updating I found the func and it's working a treat.

Thanks ever so much for your help - really appreciate it.

@mmick66
Copy link
Owner

mmick66 commented May 24, 2016

No worries

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