I have a form in which the user will select days and then select a date from calendar view..
for example: the user will first select sun and mon .. then click on date button an so calendar view will be shown ..
I want the user just be able to select dates in days sun or mon .. i want to disable the other days and highlight them for example ..
what is the best way to do that?
i saw these two libraries:
https://cocoapods.org/pods/JTAppleCalendar
https://github.com/WenchaoD/FSCalendar
but didn't find anything that helps me do what i need using them..
what is the best way to do that?
You have to consider Sunday as 1, Monday as 2, Tuesday as 3 and so on Saturday 7.
Define below globally
Write below line in
viewDidLoad
.Here 1, 2 means user selected Monday and Tuesday (so This array contains only those dates which are Sunday and Monday)
Below is Function that returns Dates array Based on Day value like 1,2 and so on till 7.
Below is FSCalendar delegates