-
Notifications
You must be signed in to change notification settings - Fork 97
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
Setting fromDate and toDate has no effect #20
Comments
yeah same problem here |
oh I figured it out @kbegeman .. you basically just have to call MNCalendarView *calendarView = [[MNCalendarView alloc] initWithFrame:self.view.bounds];
calendarView.delegate = self;
NiceDate *previousDate = [NiceDate niceDate];
previousDate.year--;
calendarView.fromDate = previousDate.date;
NiceDate *futureDate = [NiceDate niceDate];
futureDate.year++;
calendarView.toDate = futureDate.date;
calendarView.selectedDate = [NSDate date];
[calendarView reloadData]; |
but i thought it would automatically scroll to the selected date! lol anyone knows how to do that? |
I call that function to scroll to todays day, you can modify it to the selected date, etc. (Also-- watch out, I use a subclassed version of UICollectionView called PSTCollectionView, but you can replace PST with UI just fine) |
Here is my code after initializing MNCaldendarView:
As you can see, I am basically wanting to have the calendar only show the next 6 months instead of the next 4 years.
The calendar view seems to basically be ignoring this.
If I go into the commonInit method in MNCalendarView.m and manually change the code from this:
to:
I can scroll it up so that it shows the full final 6 month, but then it snaps back into place for the month above it. I am assuming it just isn't recognizing that this is now the new "last month". I also can't find the area where it detects the last month, so I am searching for that still.
Any insight would be great, thanks!
The text was updated successfully, but these errors were encountered: