Fix: Invisible selected date#23
Merged
ngocvuphan merged 1 commit intongocvuphan:mainfrom Feb 24, 2026
Merged
Conversation
…d lastDate bounds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: When an initialDate is provided that falls outside the allowed range (e.g., it is disabled), the calendar assigns a white text color (onPrimary) to the selected day, but sets the background color to null because of the isEnabled && isSelected condition in BoxDecoration. This makes the text invisible on light themes.
Solution: Changed the background color logic to color: isSelected ? color : null. The color variable is already properly calculated a few lines above to have a lower opacity (.withAlpha(128)) if the date is disabled. This change allows the disabled-but-selected date to show a greyed-out primary background, making the white text readable and indicating what the current initial value is without allowing the user to select other disabled dates.