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

Change fill color for Unselected dates. #254

Closed
bopeola21 opened this issue Apr 6, 2016 · 6 comments
Closed

Change fill color for Unselected dates. #254

bopeola21 opened this issue Apr 6, 2016 · 6 comments

Comments

@bopeola21
Copy link

Hi,

I was wondering if there was a way to change the fill color for specific unselected dates?
I couldn't find this in the FSCalendarDelegateAppearance Methods.

Thanks in advance!

@WenchaoD
Copy link
Owner

WenchaoD commented Apr 7, 2016

Hi @bopeola21
There isn't such a method so far, as it's a common request, I'll put this in to-do-list.

@bopeola21
Copy link
Author

Thanks for the reply..I don't use Github site often, is there a way to check for updates for when you do add the feature?

Thanks much!

@WenchaoD
Copy link
Owner

WenchaoD commented Apr 7, 2016

If you've set up an email address for github profile, you will get the notice once I comment here.

@pradeep-chauhan
Copy link

@bopeola21 you can do but you have to take two array and set background color according your requirment.
This method will help you.
For Ex:

func calendar(calendar: FSCalendar, appearance: FSCalendarAppearance, selectionColorForDate date: NSDate) -> UIColor? {
        if (firstDates(date) == true) {
            return UIColor.redColor

        }
        return UIColor.greenColor
    }

Don't Forget to add Appearance delegate.

@bopeola21
Copy link
Author

@pradeep-chauhan thanks for the reply...That delegate method is only called for selected cells, I wanted something that changed the background color for specific unselected cells. While this technique is an option, my code would look a lot cleaner and less hacky if changing the background color for unselected cells was an option.

@pradeep-chauhan
Copy link

@bopeola21 Just make a two array and select all date as default. Then when you click on date it will goes to didSelect method here you can deSelect that date and also remove from array. so you can able to do like this way.
and after this reload calendar.

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

No branches or pull requests

3 participants