Black
Black

Reputation: 20322

HTML - style input type "time" - change color of selection

Is it possible to style the blue rectangles? I need to change the color to orange.

There are some handles to change some style (see here), but I couldnt find one for those.

enter image description here

<input class="timeBox" type="time" value="13:30"/>

Upvotes: 6

Views: 4981

Answers (2)

Sebastian Pelaez
Sebastian Pelaez

Reputation: 126

at least you can change the icon indicator with css:

Before:

 <input class="timeBox" type="time" value="13:30"/>

After:

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(100%) sepia(0%) saturate(3207%) hue-rotate(130deg) brightness(95%) contrast(80%);
}
 <input class="timeBox" type="time" value="13:30"/>

Upvotes: 1

sanjay prajapati
sanjay prajapati

Reputation: 92

No , It is not possible to give the other colors u can give the color to just the outer but inner part is not possible
enter image description here

Upvotes: 1

Related Questions