CalendarView icon indicating copy to clipboard operation
CalendarView copied to clipboard

isToday text color issue *FIX*

Open salvaterra opened this issue 5 years ago • 2 comments

Fix suggestion for out of the range cells being colored with cellTextColorToday color. Some cells that are not today are being "randomly" colored (more analysis needed). Obviously, with the fix, if today is out of the range it will not be colored.

func updateTextColor() {
    if isSelected {
        self.textLabel.textColor = style.cellSelectedTextColor
    }
    /*else if isToday {
        self.textLabel.textColor = style.cellTextColorToday
        //print(self.textLabel.text!)
    }*/
    else if isOutOfRange {
        self.textLabel.textColor = style.cellColorOutOfRange
    }
    //added
    else if isToday {
        self.textLabel.textColor = style.cellTextColorToday
    }
    else if isAdjacent {
        self.textLabel.textColor = style.cellColorAdjacent
    }
    else if isWeekend {
        self.textLabel.textColor = style.cellTextColorWeekend
    }
    else {
        self.textLabel.textColor = style.cellTextColorDefault
    }
}

salvaterra avatar Apr 22 '20 14:04 salvaterra

@salvaterra we were facing the same issue and this helped us, thanks!

tomisykora avatar Nov 03 '20 09:11 tomisykora

I am seeing this issue on 1.8.9

ismael9291 avatar Mar 18 '22 18:03 ismael9291