I am using Tapku library for calendar implementation. I could see that there is a way to add Markers for predefined start and end date but I want to allow users to select/unselect any number of dates from current month only, and want to generate event for each action.
Moreover, I have switched off the month navigation functionality by returning nil for Left and Right arrow to display only current month but not able to remove events for few previous and next months Date tiles that gets displayed on current month. I can still select previous month's day 31st to navigate to previous month or select 1st on next month to navigate to next month. Can I restrict the date selection to only current month please?
Thanks.
In
TKCalendarMonthView
there is a method namein that method comment this line
this wont allow you to change month. You can store all selected date in an array and pass all the values in
The above method is used to put tiles but if u want selection image then u can replace it with tile image
The touches are handled in
TKCalendarMonthView.m
in the following method:look at the block at row 563:
The selecting/deselecting perhaps doesn't work as you expect. It's not like
setDateSelected
andsetDateDeselected
.. instead there is a singleUIImageView*
, which represents the selected state. And that view is moved around to the current position. You can search forself.selectedImageView
in the code to see, what is happening.So its not that easy to introduce multiple-date-selection. The architecture isn't built for that.
You can also try this code:
You can do this by first entering the dates in to an array. code for this is.
}
After this you have to use a button click action by which you can make the dates selected between these two dates. Code for it is:
}
Then in one delegate method you just have to make an array containing all the dates between these two dates. It will be called just after the button click. Code for it is:
}
I hope, this helped you. Please let me know if you face any problem.