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

numberOfRowsInMonth is always 6 #12

Open
singhal2 opened this issue Jun 15, 2017 · 2 comments
Open

numberOfRowsInMonth is always 6 #12

singhal2 opened this issue Jun 15, 2017 · 2 comments

Comments

@singhal2
Copy link

Please update the binding for Xamarin iOS nuget.

- (NSInteger)numberOfRowsInMonth:(NSDate *)month
{
    if (!month) return 0;
    if (self.showsPlaceholders) return 6;
    NSDate *firstDayOfMonth = [self beginingOfMonthOfDate:month];
    NSInteger weekdayOfFirstDay = [self weekdayOfDate:firstDayOfMonth];
    NSInteger numberOfDaysInMonth = [self numberOfDatesInMonthOfDate:month];
    NSInteger numberOfPlaceholdersForPrev = ((weekdayOfFirstDay - self.firstWeekday) + 7) % 7;
    NSInteger headDayCount = numberOfDaysInMonth + numberOfPlaceholdersForPrev;
    NSInteger numberOfRows = (headDayCount/7) + (headDayCount%7>0);
    return numberOfRows;
}
@MarcBruins
Copy link
Owner

Please make a PR and update the lib to the latest

@singhal2
Copy link
Author

I updated the library though nuget. I am unable to bind the libraries myself. Any help is appreciated

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