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

Current Date not colored #11

Closed
cytryn opened this issue Oct 21, 2014 · 3 comments
Closed

Current Date not colored #11

cytryn opened this issue Oct 21, 2014 · 3 comments

Comments

@cytryn
Copy link

cytryn commented Oct 21, 2014

Current date only gets colored after I selecting the current date and then changing...

@hons82
Copy link
Owner

hons82 commented Oct 21, 2014

Sorry, I don't understand that...
Could you explain that a bit better... or add a screenshot of what you mean

thx

@cytryn
Copy link
Author

cytryn commented Oct 22, 2014

On the example project, current date was supposed to be red.

But it only turns red if I select the current date and then selecting another date.

Open the example, select todays date and then select another one, you will see

@hons82
Copy link
Owner

hons82 commented Oct 23, 2014

It's changing to white when the selected date is the current date.
In THDateDay that's the piece of code doing that

    if (self.currentDateColor && [self isToday]) {
        [self.dateButton setTitleColor:self.currentDateColor forState:UIControlStateNormal];
    }

Actually you'd just need to change it to this to have the behaviour you want

    if (self.currentDateColor && [self isToday]) {
        [self.dateButton setTitleColor:self.currentDateColor forState:UIControlStateSelected];
        [self.dateButton setTitleColor:self.currentDateColor forState:UIControlStateNormal];
    }

but this looks really disgusting, that's why I didn't put that in first place.

hons82 added a commit that referenced this issue Oct 23, 2014
Podspec to 0.2.2
@hons82 hons82 closed this as completed Oct 23, 2014
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