MNCalendarView is a customizable calendar component backed by UICollectionView.
MNCalendarView *calendarView = [[MNCalendarView alloc] initWithFrame:self.view.bounds];
calendarView.selectedDate = [NSDate date];
calendarView.delegate = self;
Highly customizable calendar component for iOS apps
License: MIT License
Could be nice if weeks start depends on the user's calendar settings, for example, or depends on the locale.
How can i achieve multiple dates selection in this API.
My requirement is when user selects two dates then i have to change the date cells color in b/w these 2 selected dates.
can i achieve my requirement using this API.
The MNCalenderView does not allow to select the date prior to one month.
I have implemented a tableview in the MNCalendarViewDayCell in order to view custom events for specific day if the device is an iPad. I know that this library is based off UICollectionViews, so I was wondering maybe in the future we could get a proper implementation of a feature like this.
Thanks,
John
As of now, I don't create a new calendar for rotation, I invalidate the layout. But the issue is when the device is rotated, random cells have a hidden date label. When you select on the cell, the label reappears but then other cell labels disappear.
What can cause this behavior?
I want to scroll calendar.collectionView from the program, but nothing work :(
This is code what I used for scrolling. Where is mistake:
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[calendarView.collectionView selectItemAtIndexPath:indexPath animated:YES scrollPosition:UICollectionViewScrollPositionBottom];
The application launched from XCode 5 used to crash on every NSDate collection method.
The log of crash is :"[__NSDate mn_beginningOfDay:]: unrecognized selector sent to instance"
Is it related to project integration on XCode 5?
hi, I'm using rubymotion and using the cocoapod.
I want to ask
Thanks !! hope to hear you all soon...
Hi,
Has anyone watched as the app uses memory while scrolling?
Am I missing this somewhere? I have combed through the code and am not seeing a way to dynamically scroll the calendarView.
Hi
Team,
First I want to thanking you for customise the calendarView,
I have small issue with didSelectDate it show previous date. I check my system time and Nslog output which is not matching [Gregorian Time].
Given my code looks like this:
self.mnCalendarView.dayCellClass = [CAMNCalendarViewCell class];
And when this mnCalendarView property is assigned through IB, then the dayCellClass property setting has no effect, because internally, the collection view has the classes already registered. I fixed this by adding an additional setter within MNCalendarView
as follows:
- (void)setDayCellClass:(Class)dayCellClass {
_dayCellClass = dayCellClass;
[_collectionView registerClass:self.dayCellClass
forCellWithReuseIdentifier:MNCalendarViewDayCellIdentifier];
}
This simply overwrites the current cell class setting for the collection view.
Still thinking of a better way, but perhaps I will go ahead and submit a PR (for this and the other 2 getters)? Happy to get opinions on this.
Here is my code after initializing MNCaldendarView:
NSDate *todayDate = [NSDate date];
NSDateComponents *dateComponents = [[NSDateComponents alloc] init];
[dateComponents setMonth:+6];
NSDate *afterSixMonths = [[NSCalendar currentCalendar] dateByAddingComponents:dateComponents toDate:todayDate options:0];
self.calendarView.fromDate = [NSDate date];
self.calendarView.toDate = afterSixMonths;
As you can see, I am basically wanting to have the calendar only show the next 6 months instead of the next 4 years.
The calendar view seems to basically be ignoring this.
If I go into the commonInit method in MNCalendarView.m and manually change the code from this:
self.toDate = [self.fromDate dateByAddingTimeInterval:MN_YEAR * 4];
to:
self.toDate = [self.fromDate dateByAddingTimeInterval:MN_YEAR * 0.5]; //<-------- Multiplied by 0.5 to get 6 months
I can scroll it up so that it shows the full final 6 month, but then it snaps back into place for the month above it. I am assuming it just isn't recognizing that this is now the new "last month". I also can't find the area where it detects the last month, so I am searching for that still.
Any insight would be great, thanks!
Should have a option like displaying particular week i.e week display.
When manually setting the beginDate or endDate, the delegate callbacks aren't triggered. Just wondering what the best practice/approach is for a case like this - should we be triggering the callback?
there is a weird problem in many islamic calendar months where two adjacent columns and two adjacent months both appear merged together, see the screenshot from iOS 7 simulator:
can anybody determine the reason behind this faulty behavior ? and how to solve it ?
p.s. problem also happens in iOS 6 simulator.
In December 2013 Gregorian display, the dates 1-4 are fine, but 5-11 are unelectable and grayed out as if they belong to a previous month. This month shouldn't show any dates from previous month. That may be the bug?
Hi,
I need to restrict previous dates to current date.
How can i make to this?
Sorry my poor English.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.