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

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

Open
SuhailShabir7 opened this issue Mar 15, 2018 · 0 comments

Comments

@SuhailShabir7
Copy link

SuhailShabir7 commented Mar 15, 2018

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;

}

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

1 participant