Skip to content

Not giving option to start event from the 15th and 45th min of any hour #39

@SuhailShabir7

Description

@SuhailShabir7

Hello,
I am using this library to create event. While i using i found one issue that this library isnt giving the option to start an event from the 15th or the 45th min.

So after looking into this library i updated one method and it starts working. But when i am updating the pod i need to write that again.

I updated the implementation in MSWeekViewDecoratorNewEvent

-(NSDate*)dateForGesture:(UIGestureRecognizer*)gestureRecognizer{
CGPoint cp = [gestureRecognizer locationInView:self.baseWeekView];
NSDate* date = [self dateForPoint:cp];

if(date.minute >=0 && date.minute < 7)            date = [date withMinute:0];
else if(date.minute > 7 && date.minute < 22)    date = [date withMinute:15];
else if(date.minute > 22 && date.minute < 38)   date = [date withMinute:30];
else if(date.minute > 38 && date.minute < 52)   date = [date withMinute:45];
else date = [[date addHour] withMinute:0];

return date;

}

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