-
Notifications
You must be signed in to change notification settings - Fork 120
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
[__NSCFCalendar dateByAddingComponents:toDate:options:]: date cannot be nil plaint, then further violations will simply silently do whatever random thing results from the nil. #36
Comments
Where did you see this error? Can you provide more information? What did you do to invoke this? |
Ok, I received these errors when I am using Min and Max date to limit the days shown on the calendar:
When I comment out:
It all works fine. I thought I was calling this wrong, so I've ignored it... I was going to work on this as the users wanted an indication of the dates on which I requested data. Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations):
|
Thanks, I'll look into it. |
The above same error I am also receiving commented by @bci & how to restrict calendar to draw dates starting from 01-04-2014 to current date only, Can anybody please help me. I am doing like this : -
But it will print only start date & end date didn't appears dates between that range, please check attached screen short. Thanks in advance. |
I've added a check to the NSCalendar category that is calling the method that's logging those errors, but I haven't necessarily fixed the issues with minimum and maximum dates. Version 2.2.2 does add a fix and unit test for date comparisons which may fix this problem. Please have another look, @gurupatel and let me know if 2.2.2 works any better. |
Revisited with MBCalendatKit at version 3.0.4 (via pod update)
Still receiving error below, and dates are only from 3/6/2016 - 3/13/2016, others blank.
|
Thanks for the feedback. I'll investigate when I have some spare time. |
MBCalendarKit 5.0.0 adopts Objective-C nullability modifiers and some API introduced in iOS 8. This should improve things, but I didn't have time to focus on this issue with this update. Let me know if 5.0.0 still has this and I'll take it into consideration on a near-future 5.x.0. |
2014-02-07 16:24:07.435 YoJo[11443:70b] *** -[__NSCFCalendar dateByAddingComponents:toDate:options:]: date cannot be nil
I mean really, what do you think that operation is supposed to mean with a nil date?
An exception has been avoided for now.
A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil.
The text was updated successfully, but these errors were encountered: