-
Notifications
You must be signed in to change notification settings - Fork 21
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
Selecting multiple dates #3
Comments
I think this is why — is there double initialization happening? |
Also would love to get a patch for multiple date selection — if we can work out a nice API this will be a great thing to have :) thanks for using DayFlow. |
I can send you my code, but I am towards the amateur end of the spectrum so it might not be much use. It is potentially a very simple problem, but being relatively new to Objective C my subclassing is still a bit guesswork. |
I happen to have approximately 15 minutes — can you put me on the repo as a temporary collaborator? |
and thanks for the help, that definitely looks like the issue |
You can just tell the collection view to scroll to the middle (reuse that chunk of code in |
Sorry for the delay, I hadn't actually added a repo for it (as it was just something I was messing around with). I've uploaded it now, and added you as a collaborator. It is basically your sample project, so needs pod install (the podfile is already present). If you don't get a chance to look at it, I will take your advice and work on it later. |
That works in viewDidAppear but not 'will' . And obviously this causes a bit of a jump. It also seems that this isn't just an issue for my subclassing, but generally when initialising your view controller via the storyboard. |
Gotcha. Storyboard usage. I will look at that and try to make the date On May 27, 2013, at 17:20, sigmundfridge notifications@github.com wrote: That works in viewDidAppear but not 'will' . And obviously this causes a — |
Hi again, |
I think we shall just expose the underlying collection view as multiple On Nov 17, 2013, at 2:19, sigmundfridge notifications@github.com wrote: Hi again, — |
ALSO — if you send a pull request I’ll be so happy to review it formally :) On Nov 17, 2013, at 2:19 AM, sigmundfridge notifications@github.com wrote:
|
I think that's basically what i did, but added a custom init to allow for single or multiple selection. Sent from my iPad On Nov 16, 2013, at 7:03 PM, "Evadne Wu" notifications@github.com wrote:
|
Hi,
Loving the calendar. I needed to select multiple dates. To do this I subclassed
DFDatePickerView
, and overwrote the following methods....Nothing to complicated, just adding/removing dates to an array and changing how a cell is displayed based on that array. Then I subclassed
DFDatePickerViewController
, and overwrote-(DFDatePickerView*) datePickerView
to use my new subclass. An extra method in the protocol passes the array to the delegate.This all worked fine when using it within your own dayFlow-sample project. Strangely, when moving the files over to my own project the calendar always opens 6 months in the past. I know you use +/- 6 months when first generating the collection view. However, I can't see why my project would start there, but the same code in your sample project starts in the middle (i.e. now).
I realise this is out of the scope of your project, but if you can think of any reasons why the same code in 2 apps would behave differently I would be very appreciative. Either way, I'd suggest considering allowing multiple dates to be selected, as it seems to be a gap in the 'market'.
The text was updated successfully, but these errors were encountered: