4

show time-picker on click whole input type time HTML5 field not only on the little clock icon

For now, it is only triggered while clicking on a small clock icon inside the field, I want it to be trigger on the whole field click.

Arun Maurya
  • 91
  • 1
  • 10
  • Which time picker component are you using? In most cases you can manually trigger showing a timepicker by calling something like `$('input#from').on('click', function() { $("#date").datepicker("show"); });` (assuming that the datepicker is bound to ``). – SaschaM78 Jul 09 '20 at 08:40
  • I'm using normal HTML5 input type time – Arun Maurya Jul 09 '20 at 09:25
  • Hi @ArunMaurya Did you managed to make it work? – Gopinath Jan 25 '22 at 09:39
  • Does this answer your question? [HTML time input type - how to let select time menu view when click anywhere not only clock icon click](https://stackoverflow.com/questions/65058103/html-time-input-type-how-to-let-select-time-menu-view-when-click-anywhere-not) – Airerr Jun 17 '22 at 03:28

1 Answers1

0

I solved by adding this line to css..

input[type="time"]::-webkit-calendar-picker-indicator{
    pointer-events: none;
}

I hope it helps someone else!

Synapsis
  • 667
  • 1
  • 5
  • 19