Skip to content

Selecting of day after the day user selected #327

@ghost

Description

I try to select the day after the day user selected. I need to select 2 days - one, that user selected and the next one. In order to do that I try to modify didSelectItemAtIndexPath in FSCalender.m
I do it like so

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath

{
    FSCalendarCell *cell = (FSCalendarCell *)[collectionView cellForItemAtIndexPath:indexPath];
    cell.dateIsSelected = YES;
    [cell performSelecting];

    FSCalendarCell *newCellToSelect = (FSCalendarCell *)[collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row+1 inSection:indexPath.section]];
    [newCellToSelect performSelecting];

    NSDate *selectedDate = [self dateForIndexPath:indexPath];
    if (!_supressEvent) {
        [self didSelectDate:selectedDate];
    }
    [self selectCounterpartDate:selectedDate];
}

But this doesn't work. Can you please point me out, what am I doing wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions