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

Input type "date" dark datepicker icon not visible on dark background #71

Open
johnaau opened this issue Mar 24, 2024 · 1 comment
Open
Labels
area/forms help wanted Extra attention is needed

Comments

@johnaau
Copy link

johnaau commented Mar 24, 2024

When using a input of type date, the browser renders a calendar icon inside the input control, however this is black so is not visible with a dark background.

I found a https://stackoverflow.com/a/70841645 on Stack Overflow and this CSS below seems to be the best solution. It makes the icon white and the date picker also appears in a dark mode.

input {
  color-scheme: dark;
}
@Carl-Hugo
Copy link
Member

Thanks for raising this @johnaau

However, this issue requires some investigation and thorough testing. For example, is there a difference between using the prefers-color-scheme vs. the .bootstrap-dark class? Is the issue happening for all browsers? Etc.

I don't know when I'll have the time to look into this, so feel free to share your strategy to fix this. Once we agree on something, I'll welcome a PR with the fix. The PR should include a calendar example in the "Forms" page and an updated screenshot of that page (the screenshots are in the ./README.md file).

@Carl-Hugo Carl-Hugo added help wanted Extra attention is needed area/forms labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/forms help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants