wenchaod / fscalendar Goto Github PK
View Code? Open in Web Editor NEWA fully customizable iOS calendar library, compatible with Objective-C and Swift
License: MIT License
A fully customizable iOS calendar library, compatible with Objective-C and Swift
License: MIT License
Hello,
first of all sorry for my bad english :P
could be great to have the possibility to set the week start day of the calendar.
I like so much this calendar and the way it's developed, very clean, but without this parameter i can't use it :(
I have added on my version a little function that may be useful, it just move the calendar to the choosed month:
- (void)moveToMonth:(NSDate*)todate {
NSInteger scrollOffset = [todate fs_monthsFrom:[NSDate dateWithTimeIntervalSince1970:0]];
scrollOffset++;
CGPoint destOffset;
if (self.flow == FSCalendarFlowHorizontal) {
destOffset = CGPointMake(_collectionView.fs_width*scrollOffset, 0);
} else if (self.flow == FSCalendarFlowVertical) {
destOffset = CGPointMake(0, _collectionView.fs_height*scrollOffset);
}
[_collectionView setContentOffset:destOffset animated:YES];
if (_header) {
_header.scrollOffset = scrollOffset;
}
}
when setting the initial calendar flow direction in viewDidLoad resulted in crash.
_calendar.flow = FSCalendarFlowVertical;
I only want the user to be able to scroll / view dates in future months, not previous months. Do you have any suggestions ?
I need to display only dates between startDate and endDate,
Looks like the date being sent to "SubtitleForDate" is incorrect. I simply echoed back the day being sent to the method which should make the subtitle the same as the day - but as you can see from the example, the subtitle doesn't match.
So in my app, I don't want any localization from happening.
But I cannot set the NSLocale in FSCalendar. Using NSDateFormatter.dateFormatFromTemplate to set the headerDateFormat does not work.
https://github.com/f33chobits/FSCalendar/blob/master/Pod/Classes/FSCalendar.m#L273
I have limited experience with UICollectionView, but I am not sure if the call to -invalidateLayout is required here. The collection view is not resized, nor are the cells. On top of that, it is causing significant performance issues on iPhone 4.
为什么日期会无故回到第一天呢?也就是设置的1970年01月
During the orientation change from portrait to landscape and vise-versa, the calendar year seems to jump; and the header view for different months is not always centered for vertical flow.
I feel like swiping left or right on the header of the calendar (Month, Year when in FSCalendarFlowHorizontal mode) should have the same effect as swiping on the lower part of the calendar?
Thank you for this fantastic control! So great!!!
I don't set color for status date disable?
Hi when I implemented minimumDateForCalendar, initially i can see two month names in title. And when I swipe right, everything back to normal.
It would also help if minimumDateForCalendar is set, it should disable all the dates before the minimum date.
Currently I am handling it in shouldSelectDate implementation. But when I do that, If I select dates of next month (which are visible in existing month in light gray color), they some different date in the same column gets selected.
Lunar display wrong ,
Hello,
In my project I need a calendar and your lib seems to fit my needs, expect that I need to be able to have a week mode view of the calendar. This feature exists already in this libs see also demo GIF.
Also I want to know if it's possible to customize the header of the calendar to be like this :
https://s3.amazonaws.com/cocoacontrols_production/uploads/control_image/image/5242/screenshot.PNG
and the text color of the days ?
https://github.com/jonathantribouharet/JTCalendar
Demo :
https://github.com/jonathantribouharet/JTCalendar/blob/master/Screens/example.gif
In iPhone5s 7.1 Simulator, there is a cell-wrapping problem which has already been mentioned here.
But if I use that code, there would be more problems in vertical
mode. I've figured out a fix which needs to invalidate collectionViewFlowlayout in every pixel of scrolling like this:
152414b
But I don't think it's intuitive.Any one has better solution?
Hi!
Thank you for an excellent calendar control.
I noticed an intersting bug: while pressing the number of the calendar - the choise does't work, but if you hold down and release (long press) - the date is selected correctly.
What do you think what may be related to this problem?
Is there any option to switch calendar to one week view mode with ability to swipe weeks horizontally?
I'm working on implementing a calendar and really like this library. I was wondering if there is a possibility to increase the height of the scrollView and weekday cell heights to make for easier use on the iPad?
I've attached what it currently looks like and an example of making it larger. Not sure what the right dimensions would be, but was wondering if we could open it up for discussion.
Hello, first of all congratulations for your work I have been very helpful and forgive my bad English, I write from Italy :)
I wanted to ask you a favor ... I have a problem ... I'm using your calendar to issue a local notification on my iPhone, the problem is that the notification is issued properly on the selected day but at 00:00 I would need that notification is set to a specific time of my choice, I can not find the right spot in your code to be able to get this ...
In short, the local notification should be out at 9:00 of the selected day on your calendar ... you can help me with this ??
thanks Fabio
Great calendar! Thanks for sharing. There seems to be a bug where the default month is 1 month earlier. You can see this in the demo as well it loads Feb instead of March (current month) and when selecting the date under the settings it goes to wrong month as well.
Hello there, you've made a good component! Thank you so much. I want to use it in my app, but before adopting I would like to know whether this can be possible or not? Please check attached screenshot. Also, if its not possible by a properly suggest me a way and I'll handle by my self. But if its possible by just setting up a property would be great enough for me.
(º–º)
When i try to run the example project, I get this error:
ld: library not found for -lPods-FSCalendar-FSCalendar
So, i check my build phases and found that libPods-FSCalendar.a is not there. Where can I get this library?
First of all let me say I love this control. Very well done. Best I've seen of the dozens of calendar controls out there.
I have implemented the calendar:shouldSelectDate
delegate callback to prevent the user from selecting a date before today. The issue I'm having is that when the user selects one of placeholder cells for the next month, the delegate callback is not passing in the correct date.
So, for example, given the month of June 2015, if the user selects the placeholder cell for July 1, I would expect the calendar to animate to the new month. However, what is happening is the wrong date is being sent to the delegate callback (it's actually sending June 3) which then causes my callback to return NO
and the calendar never animates to the new month.
I'm hoping I'm being clear. Let me know if you have any questions. Thanks again!
The selected date is the topmost date in the column. For example, when I try to tap August 1st when I'm in July view, the selected date will be 4th July.
Hey @f33chobits,
First of all thank you for FSCalendar it certainly is a nice tool for iOS. Here I suggest a couple of improvements for it:
· FSCalendar should let select multiple dates by the user (with more than one circle).
· FSCalendar should programmatically let add circles to the desired dates(for instance from a [NSDate]).
Thank you again for the effort you have put in it!
This seems a little strange, shouldn't it behave like this
How can I use the methods if my project is Swift based?
func didSelectDate(calendar:FSCalendar,date:NSDate)
{
print(date)
}
/*
- (void)calendar:(FSCalendar *)calendar didSelectDate:(NSDate *)date
{
// Do something
}*/
I tried the above, but it does not get triggered..
Hi again,
There is a flickering of the dates collection view to while reloading which obvious. Is it normal or I'm not doing good in datasource. I see the dots fot events show up in other dates for small fraction of time and disappear.
How to reproduce :
Then calendar will move to start date (1970 in my case)
Hi,
It would have been really better if we were able to set the selectedDate which is now readonly. On the other hand, the currentDate is not that useful to be settable. Can you help me figure out how to swap them? or give the make selectedData writable?
As title explain, I'm trying to implement two object of FSCalendar
into a single view controller, its crashing when I try to change month, the reason of this can be multiple instance using same object of [NSCalendar fs_sharedCalendar]
at once.
if minimum date delegate is not implemented, and selectedDate is set to today date, some time shows calendar of Jan-1970.
Here's how to reproduce.
At this time the calendar will move to May instead of March.
I am having the same problem on version 0.9.3 on Issue #37 but changing the minimum date does not fix it. When I switch the flow to Horizontal I don't have this problem, only when on Vertical.
Since you mentioned this could be related to the minimum date, I have removed the minimum date callback and now the problems are even more bizarre. The month headers now say the year 2061. However, when I select the date, it's still the correct month in 2015.
I should mention I am using Xcode Beta 5 and compiling with the iOS 9 SDK. Appreciate any help you can provide on this. Thanks!
日历怎么打多个点?有提供接口么?或者返回一个View,或者给某天加特定的颜色、背景等等
@f33chobits First of all thanks for creating this lib. I found FSCalendar very helpful with my recent project. I was just wondering if you're planning to add more customisation options to the header view appearance? ( e.g. background colour, custom previous/next month views/actions )
Hi,
I had a look at your example the other day and completely missed that you have to swipe on the calendar body to get the month to change in horizontal mode. Looking again today, I noticed that you can swipe, but you can't swipe on the month. :(
I really think this an unintuitive experience, please can to make a fix this?
It seems such a shame that this is missing!
Also, scanning through the source, I notice there are private minimum and maximum date variables, it would be awesome if these could be made public, so a date range could be added.
Also, another thing which concerns me, when running the iOS 8 and iphone 6, there's a tonne of warnings and depreciations. I know these could be hidden with a flag in the podfile, but most of these seem very simple to fix, xcode even provides the answers to the them.
I just wanted to provide some feedback and give you a pat on the back, good job.
Thoughts ?
Best regards,
Jules.
Build failed with this error:
ld: library not found for -lPods-FSCalendar-FSCalendar
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.