RVCalendarWeekView icon indicating copy to clipboard operation
RVCalendarWeekView copied to clipboard

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

Open SuhailShabir7 opened this issue 7 years ago • 0 comments

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;

}

SuhailShabir7 avatar Mar 15 '18 18:03 SuhailShabir7