0

By default, the datepicker opens when the icon is clicked.

Now, i want the datepicker to appear when the input field is clicked. I can achieve this by enlarging the icon to 100% width, but i can't make it transparent, so there would be no icon at all but only the text visible...

I think i have seen solutions fro this the other day, but now, i did not find anything at all.

How can i get the desired effect? PS: A onFocus solution would be even better than onClick.

input#modified::-webkit-calendar-picker-indicator {
  width: 100%;
  margin: 0;
  border: 1px solid red;
  background: none;
}
Normal: only icon-click shows datepicker 
<input type="datetime-local" ><br>
Modified: click red outline for datepicker
<input type="datetime-local" id="modified">
sirtet
  • 55
  • 1
  • 8
  • Does this answer your question? [Method to show native datepicker in Chrome](https://stackoverflow.com/questions/15530850/method-to-show-native-datepicker-in-chrome) – Heretic Monkey Nov 03 '21 at 14:05
  • Yes, it is the Page I had seen before. The answer I used is linked in the answer below. – sirtet Nov 04 '21 at 22:49

1 Answers1

1

This works for me. It is the answer that i had seen before but did not find.

sirtet
  • 55
  • 1
  • 8