Skip to content

Textfield with type="date" not working correctly in chrome #35

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

Open
Timbuktu1982 opened this issue Apr 11, 2025 · 9 comments
Open

Textfield with type="date" not working correctly in chrome #35

Timbuktu1982 opened this issue Apr 11, 2025 · 9 comments

Comments

@Timbuktu1982
Copy link

Hi there,

when i used a textfield with type="date" it working correctly in firefox, but not working correctly in chrome or edge. I miss the date-picker from browser. On your Demo-Page you can reproduce the problem...

I have always reported the issue in material-components/material-web#5795.

Can you help me?

Copy link

Thanks for the issue, @Timbuktu1982!

Please consider supporting the project by becoming a sponsor: GitHub Sponsors.

Sponsor issues get prioritized. If you get paid $100 per hour and this fix will save you an hour or more, then a $10 per month subscription for 10+ months will pay for itself.

@treeder
Copy link
Owner

treeder commented Apr 11, 2025

Can you share screenshots of the problem?

@Timbuktu1982
Copy link
Author

Yes, i can use your demo page.

Chrome is not working (date-picker on right side is missing):
Image

Firefox is working (date-picker on right side is available):
Image

The problem is also existent in material-components/material-web...

@treeder
Copy link
Owner

treeder commented Apr 11, 2025

I've seen this before, it's only on dark theme. Light theme:

Image

The icon is there in dark mode, it's just black so it's very hard to see. If you look closely you can see it though.

And it's a chrome issue:

https://stackoverflow.com/questions/62162645/change-color-of-calendar-icon-in-html-date-input

Can probably use something from there to fix it.

@Timbuktu1982
Copy link
Author

Hi Treeder,

thank you for your reply. Thats a a good approach, but unfortunately the solutions given from Stackoverflow doesn't work for me either.
I have changed the Chrome display settings to the light theme, but the date picker is still not there.

Have you another idea?

@treeder
Copy link
Owner

treeder commented Apr 15, 2025

I don't, I suspect the stuff in that stackoverflow article is the only way to do it. Can you share a screenshot of your light mode? I see it on chrome. I also see it on your dark mode, but it's black.

Image

@Timbuktu1982
Copy link
Author

Hi Treeder,

thank you for your reply and the screenshot.

I have discovered the button. I was expecting it on the far right (like in Firefox, show Screenshot), but it wasn't there. But with the screenshot I was able to locate the button better.

Firefox:
Image

However, my application is still not working. There is no button to be seen (see screenshot below).

Is it possible that changes have already been made to the text field in your fork? I'm asking because I'm currently using the original version. I will install your version today and then test it. I will give you feedback.

Image

@time4innovation
Copy link

Hi Treeder,

i have also tested with your fork repo and it works fine.

Now I have the problem that I can't use your fork repo in my project because I use the package https://github.com/maicol07/material-web-additions to get components for "card" and "data-table". This package uses @Material. So I can install your package, but I can't use your components, because when I import a component from your package, I get a conflict with the @material/web-package of the same name.

Image

Have you an idea for what i can do? (I know, that would actually be worth a new topic.)

@Timbuktu1982
Copy link
Author

Sorry, i have used my other account for the last answer. time4innovation is my company account...

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