Skip to content
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

JTAppleCalendar 6.0 Two-Tap range selection #751

Closed
sreekanthps opened this issue Apr 4, 2018 · 15 comments
Closed

JTAppleCalendar 6.0 Two-Tap range selection #751

sreekanthps opened this issue Apr 4, 2018 · 15 comments
Assignees

Comments

@sreekanthps
Copy link

I am trying to build my iOS app calendar component with JTAppleCalendar and i have requirement for two tap range selection, i have followed steps as per documentaiton. But i am not able to highlight the color between date range. Attaching code and screen shot of my requirement.

Your help is very much appreciated
screen shot 2018-04-05 at 1 14 05 am
DBSCalendar.zip

@patchthecode
Copy link
Owner

will take a look after work today

@patchthecode
Copy link
Owner

I just checked out your code.
You did not have this enabled ->

calendarCollection.allowsMultipleSelection = true

That line was commented out.
Fix that and your range selection will work.

@patchthecode
Copy link
Owner

closing issue.
if still stuck then let me know.

@sreekanthps
Copy link
Author

Hi,

Sorry for delay in responding, that totally work. I have 2 issues now

  1. cellInset is missing to avoid space between cells
  2. When i use calendarview. selectDates to highlight dates between, some dates are not being delegated
    (screen shot and code is attached)
    DBSCalendar 2.zip

screen shot 2018-04-15 at 10 07 45 pm

screen shot 2018-04-15 at 10 07 45 pm

@patchthecode
Copy link
Owner

Have you implemented the willDisplayCell function as shown in bold important text on the the main page? :) --> #553

@sreekanthps
Copy link
Author

Hi,

Yes , thats where i see the issue, when i call calendarview. selectDates for selecting multiple dates
willDisplayCell is called for the dates between first and last day, and missing the day before last day

@sreekanthps
Copy link
Author

In the screen cap attached i am not getting the date 25th in willDisplayCell delegate,
this is happening with calendarview. selectDates

@sreekanthps
Copy link
Author

How about cellInset ? i i need to reduce the gap between cells (remove empty space)

@patchthecode
Copy link
Owner

patchthecode commented Apr 16, 2018

The same as for a UICollectionView.

        calendarView.minimumLineSpacing = 0
        calendarView.minimumInteritemSpacing = 0

@sreekanthps
Copy link
Author

Hi,

My height issue got resolved, but assigning cellsize = view.frame/width/7 (since i display 7 rows)
But the second issue is not solved yet

When i select calendarCollection.allowsMultipleSelection = true and when i select two date ranges, the day before end date is not getting willDisplayCell delegate call

attaching screen cap and code for reference
DBSCalendar 3.zip
screen shot 2018-04-16 at 1 03 37 pm

@patchthecode
Copy link
Owner

i think you are making this way much harder than it needs to be man.
have you looked at the range selection tutorial? Its for version 6.0 but porting it over should be too hard.

here is your zipped file, i removed most of the un-needed code. it should take you to 90% of the way there
DBSCalendar 2.zip

@sreekanthps
Copy link
Author

I am using 7.0 version, looks like that is issue with 7.0 . Let me try the same in 6.0

@patchthecode
Copy link
Owner

you should be using version 7.1.5
Many bugs have been fixed in the prior versions.

@sreekanthps
Copy link
Author

thank you very much, that helped a lot, we are trying to add the project as source code into our code, the reason being we are using some security libraries that don't allow dynamic frame works
If we have static library also works for ur. please help us with static library

@patchthecode
Copy link
Owner

@sreekanthps i do not know much about static libraries. Sorry about that. I know more about cocoapods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants