GithubHelp home page GithubHelp logo

k06a / abcalendarpicker Goto Github PK

View Code? Open in Web Editor NEW
709.0 709.0 118.0 3.66 MB

Fully configurable iOS calendar UI component with multiple layouts and smooth animations.

License: MIT License

Ruby 0.38% Objective-C 99.62%

abcalendarpicker's Introduction

k06a's GitHub stats

  • 🔭 I’m currently working on Innovations
  • 🌱 I’m currently learning Physics
  • 💬 Ask me about DeFi
  • 📫 How to reach me: t.me/k06a
  • ⚡ Fun fact: Studied underwater fighting and underwater rugby

abcalendarpicker's People

Contributors

a2 avatar k06a avatar kcharwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

abcalendarpicker's Issues

How to configure calendar range?

Hi,

I'm just wondering if there's anyway to config calendar range. For example, I just want to show calendar from May 16 2013 to May 16 2014? Thanks.

Hepeng

Manually Reload Datasource

Hi there:

Is there a way to manually reload the calendar? I need some way to recall - (NSInteger)calendarPicker:(ABCalendarPicker *)calendarPicker numberOfEventsForDate:(NSDate *)date onState:(ABCalendarPickerState)state

Thanks

Keep Podspec up to date

It would be nice to keep the Podspec up to date in order to benefit from the latest commits.

How to add separator lines between the dates

Hi,

I customised calendar view as
screen shot 2014-09-15 at 1 54 28 pm

But need to addd senator lines between the dates as showed below.
screen shot 2014-09-15 at 1 50 55 pm
I have tried to get the info where to add the lines. But couldn't able to find it.

Can some one let me know the way to do that .

Thanks in advance.

Навигация.

Как простым образом можно отключить навигацию по годам?
СПС за помощь.

Can't tab on date in this week

Hi, I use your framework integrate with RasiedCenterTabbar. I use the ABCalendarView on third tab (Not show at first tab). Once i tab on the tab to show ABCalendarView, it shows up but unable to tab on start data of this week (week of today) till last day of month. After i swipe to other month and swipe back those days are able to tab and work well. Could u hit or suggest me how to solve that.
Thank you in advance

when trying to build Demo bundle is not built

error: /Users/Admin/Library/Developer/Xcode/DerivedData/ABCalendarPickerDemo-gkspssoxcanyhzgqqrthznlbhexw/Build/Products/Debug-iphonesimulator/ABCalendarPicker.bundle: No such file or directory

I was able to build bundle as a separate project in order to use it in my own app, but trying to understand functionality/features as well as why things do not work by getting Demo to work.

Is the position of the events table adjusted on the origin load in the Demo? For some reason I cannot get it to work in my app.

Not Properly Working for iOS 5

Hi,

This code is not working for iOS 5 and lower version. It displays calendar but not able get next/previous month by pressing arrow buttons.

Navigation bar is miising..

screen shot 2014-01-22 at 4 03 05 pm

I implement ur app in my Xcode project.But missing a navigation bar.so i cant add new event to the Calendar.How can i add navigation bar which shown in the screenshot..

Hiding long arrows

Can I somehow eaisly hide long arrow buttons (I don't want them on calendaer)?

iOS 7 design

The calendar design should be updated for iOS7's new design. Is anything planned?

Demo is not working

Demo is not working. It generates an error (ABCalendarPicker.bundle: No such file or directory.) Can you help me ?

Disabling some dates.

May I know if it could be possible to disable some dates ? like if I want to apply it for weekends?

Tnx.

Timezone

I am receiving "Error loading timezone data from file system. This is a serious problem. Calendar data is not guaranteed to be accurate." when I run the code on a iDevice but there is no warning in simulator. I noticed that in both cases, timezone is GMT and not localTimezone. I tried to find it in source code but I couldn't.

can you please help me regarding this ?

tnx

Pod not working correctly

I finally got some time to try ABCalendarPicker (the CocoaPods version). However, I'm experiencing something that may not be intended behavior.
I tried a minimalistic approach, just like the one in the demo. As screenshots may tell more than words:

Right after starting the App:
Screen Shot 2013-04-01 at 1 51 56 PM

Hitting "Today" ([self.calendarPicker setDate:[NSDate date] andState:ABCalendarPickerStateDays animated:YES];) leads to the following:
Screen Shot 2013-04-01 at 1 51 59 PM

Hitting "Today" again.. this seems to be almost "right", but there is still an empty row.
Screen Shot 2013-04-01 at 1 52 03 PM

I hope this is enough to reproduce this bug.

Can't press last line of days

Hello, i can't understand why i can't press the last line of days:

schermata 2013-08-04 alle 16 33 11

it's like disabled, the line of the 18, works, instead if i press one day of the 25 line (25 or 26 etc...) seems disabled, for make that line of days working i have to double tap a day (not in that line) to change in the three week view, then double tap again to restore in 4 week view and now that days works...i can't understand why, your demo project works, and if i in your demo project i create a new UIViewController with a Calendar Picker view just like you did, doesn't work a have the error i'm explained, any idea?

delegate and dataSource --> retain cycle

In ABCalendarPicker.h the properties for the delegate and the dataSource are defined as follows:

/** Delegate is needed for configuring and noticing calendars behavior. /
@Property (strong,nonatomic) id delegate;
/
* Delegate is needed for displaying user information on calendar. */
@Property (strong,nonatomic) id dataSource;

The property for the property is strong. This leads to a retain cycle! And this results in that the controller, which serves as a delegate is never deallocated.

The properties should be defined as follows:
/** Delegate is needed for configuring and noticing calendars behavior. /
@Property (assign,nonatomic) id delegate;
/
* Delegate is needed for displaying user information on calendar. */
@Property (assign,nonatomic) id dataSource;

(Hope you understand, what I'm saying!)

Change Language

how do i change the language of the calendar? now as it is the calendar picks que current language of the device but i want to force a diferente language specified by the user in settings... How can i accomplish this?

Ty for the great job so far, your help will be highly appreciated .

While running the demo project I am getting the exception.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: 0)'
*** First throw call stack:
(
0 CoreFoundation 0x01e7c5e4 exceptionPreprocess + 180
1 libobjc.A.dylib 0x016a98b6 objc_exception_throw + 44
2 CoreFoundation 0x01f06578 -[__NSDictionaryM setObject:forKey:] + 888
3 ABCalendarPickerDemo 0x0002520e -[UIMyButton setBackgroundImage:forState:] + 190
4 ABCalendarPickerDemo 0x00023442 __81-[ABCalendarPickerDefaultStyleProvider calendarPicker:cellViewForTitle:andState:]_block_invoke + 2226
5 ABCalendarPickerDemo 0x00020554 -[ABViewPool giveExistingOrCreateNewWith:] + 660
6 ABCalendarPickerDemo 0x00022a89 -[ABCalendarPickerDefaultStyleProvider calendarPicker:cellViewForTitle:andState:] + 233
7 ABCalendarPickerDemo 0x0000db43 -[ABCalendarPicker updateButtonsForProvider:andState:] + 1107
8 ABCalendarPickerDemo 0x0001338c -[ABCalendarPicker changeStateTo:fromState:animation:canDiffuse:] + 5836
9 ABCalendarPickerDemo 0x00016cf9 -[ABCalendarPicker setState:animated:] + 601
10 ABCalendarPickerDemo 0x00016205 -[ABCalendarPicker initWithStyleProvider:weekdaysProvider:daysProvider:monthsProvider:yearsProvider:erasProvider:] + 1045
11 ABCalendarPickerDemo 0x0001655e -[ABCalendarPicker initWithDefaultProviders] + 382
12 ABCalendarPickerDemo 0x00016810 -[ABCalendarPicker initWithCoder:] + 176
13 UIKit 0x004b06f2 -[UIClassSwapper initWithCoder:] + 240
14 Foundation 0x010afd6a _decodeObjectBinary + 3498
15 Foundation 0x010aee55 _decodeObject + 340
16 Foundation 0x010aecf9 -[NSKeyedUnarchiver decodeObjectForKey:] + 181
17 UIKit 0x004b0288 -[UIRuntimeConnection initWithCoder:] + 191
18 Foundation 0x010afd6a _decodeObjectBinary + 3498
19 Foundation 0x010b1226 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 2204
20 Foundation 0x010b1495 -[NSArray(NSArray) initWithCoder:] + 255
21 Foundation 0x010afd6a _decodeObjectBinary + 3498
22 Foundation 0x010aee55 _decodeObject + 340
23 Foundation 0x010aecf9 -[NSKeyedUnarchiver decodeObjectForKey:] + 181
24 UIKit 0x004af702 -[UINib instantiateWithOwner:options:] + 1117
25 UIKit 0x00321c95 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
26 UIKit 0x0032243d -[UIViewController loadView] + 302
27 UIKit 0x0032273e -[UIViewController loadViewIfRequired] + 78
28 UIKit 0x00322c44 -[UIViewController view] + 35
29 UIKit 0x0024b5ad -[UIWindow addRootViewControllerViewIfPossible] + 66
30 UIKit 0x0024b947 -[UIWindow _setHidden:forced:] + 312
31 UIKit 0x0024bbdd -[UIWindow _orderFrontWithoutMakingKey] + 49
32 UIKit 0x0025644a -[UIWindow makeKeyAndVisible] + 65
33 ABCalendarPickerDemo 0x00002adb -[ABAppDelegate application:didFinishLaunchingWithOptions:] + 683
34 UIKit 0x00208f65 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
35 UIKit 0x002097a5 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1536
36 UIKit 0x0020dfb8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
37 UIKit 0x0022242c -[UIApplication handleEvent:withNewEvent:] + 3447
38 UIKit 0x00222999 -[UIApplication sendEvent:] + 85
39 UIKit 0x0020fc35 _UIApplicationHandleEvent + 736
40 GraphicsServices 0x023fe2eb _PurpleEventCallback + 776
41 GraphicsServices 0x023fddf6 PurpleEventCallback + 46
42 CoreFoundation 0x01df7dd5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION
+ 53
43 CoreFoundation 0x01df7b0b __CFRunLoopDoSource1 + 523
44 CoreFoundation 0x01e227ec __CFRunLoopRun + 2156
45 CoreFoundation 0x01e21b33 CFRunLoopRunSpecific + 467
46 CoreFoundation 0x01e2194b CFRunLoopRunInMode + 123
47 UIKit 0x0020d6ed -[UIApplication _run] + 840
48 UIKit 0x0020f94b UIApplicationMain + 1225
49 ABCalendarPickerDemo 0x000027f8 main + 168
50 ABCalendarPickerDemo 0x00002745 start + 53
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I resolved this by checking whether the image object is nil or not.

  • (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state
    {
    if (image)
    [self.backgroundImages setObject:image forKey:[NSNumber numberWithInt:state]];
    if (self.state == state)
    [self setNeedsDisplay];
    }

But I am not getting the proper calendar view. Please look the screenshot.
ios simulator screen shot 18-oct-2013 4 13 46 pm

Ability to open the Calendar in Week Mode

Hi All

Is it possible to open the Calendar in Week day mode. As when viewing it on an iPhone 4S with the bottom TabBar and NavigationBar the Table View is not visible.

If this is not possible can I please request this as a possible feature in the future ?

Thanks,
Michael

[Feature Request]

Calendar support would make this control so amazing! Would anyone be able to do this?

ABCalendarPickerDelegate - calendarPicker:shouldSetState:fromState

Hi,

I was attempting to use your framework for an upcoming app I'm working on. But I wanted to lock the app down to one particular state. However after some head scratching and debugging I found that your delegate method for 'calendarPicker:shouldSetState:fromState:' was never re-enabling user interaction if any of the states were disallowed.

So I've manually made a change in my copy of your app code as follows:

Current live code:

    if ([(id)self.delegate respondsToSelector:@selector(calendarPicker:shouldSetState:fromState:)]
        && ![self.delegate calendarPicker:self shouldSetState:toState fromState:fromState])
    {
        return;
    }

My fix:

    if ([(id)self.delegate respondsToSelector:@selector(calendarPicker:shouldSetState:fromState:)]
        && ![self.delegate calendarPicker:self shouldSetState:toState fromState:fromState])
    {
        self.userInteractionEnabled = YES;
        return;
    }

Figured that some others may have been stuck with this.

Regards,
Rob

Landscape rotation not working correctly

When rotating the view controller from portrait to landscape, the calendar will not extend to the edge correctly. I'm pretty sure I have constraints set up correctly. Any ideas? Please see attached screenshot.
calendar_rotation

re-calculate today day

i have see an issue, if the app remain in the background, and is not terminated, when open it doesn't calculate the today day (if the day is changed) because it's not called the viewDidLoad method, there is a way to refresh the today day? maybe in the viewwillappear?

EDIT: i have found this:

[self.calendarPicker setDate:[NSDate date] andState:ABCalendarPickerStateDays animated:YES];

but if i insert it in the viewwillappear every time the view is open, put the today date, and if the user have visited a particular date, when he return on that view he doens't see it anymore but see the today day, there is another solution?

Know current month, willChangeToMonth and didChangeToMonth

Knowing if the picker changes month lets me go ahead and fetch all the entities from database (Core Data) for that month in one go.

Right now in viewDidLoad I am using protocol's mainDateBegin and mainDateEnd to know the range for a fetch.

It would definitely be great to know the range of dates on screen for one large database query.

Limit number of rows shown in calendar

It would be a great feature enhancement if the ABCalendarPicker calendar supported showing only 3 weeks of the month at a time and allowed you to swipe up and down to move through time.

You have this feature for 1 week, making it for 3 would be a perfect fit to leave room for list of events, etc. below.

In some months like 2012.09, there are as many as six weeks shown. And if the app has a title bar and a tab bar then in that case there is only room one event detail row below.

I think developers would love this feature and end users.

More calendar features planned?

I just took a look at your calendar picker, it looks really nice. Do you intend to add more features that are present in the iOS7 calendar?

Crashing on chinese region format

Settings > General > International > Region Format > Chinese > China

Open demo, click on month,
ABCalendarPickerDemo[54182:c07] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSCFString substringToIndex:]: Range or index out of bounds'

Days Provider LongNext / LongPrev

Is it possible to disable the "year skip" and the LongPrev and LongNext buttons via a style provider? Or will the Days Provider have to be modified to not draw the buttons and disable the actions performed by those buttons?

ABCalendarPicker.h not found

Hi,

I Choose ABCalendarPickerAll scheme and build, then I drag the framework and the bundle into my project, then i went to main.m to add the line

import #import <ABCalendarPicker/ABCalendarPicker.h>

but it gives me an error that "ABCalendarPicker/ABCalendarPicker.h not found"

why is that?

thanks

Port ABCalendarPicker to Mac OS X

Hi, I love your amazing calendar, I want know if it's possible port to to OS X, I have searched for a calendar component for Mac OS X but seems that there is really really nothing, I'm wrong?
Then seen that you calendar for me is the best for Mac OS X, I'm wondering if it's possible port it to Mac.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.