Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable input=time clear button

Tags:

html

I am trying to restrict users input when selecting time on input=time. so is it possible to disable the small clear button from the input?

enter image description here

like image 986
Ahmed Ali Avatar asked Oct 29 '13 10:10

Ahmed Ali


People also ask

How do I hide the input time icon?

input[type="time"]::-webkit-calendar-picker-indicator { background: none; display:none; } removes the space too.

How do I make input clear?

To clear all the input in an HTML form, use the <input> tag with the type attribute as reset.

How do you reset input date?

$('input[type=date]'). val(''); $('input[type=date]'). val('0000-00-00');


1 Answers

Just add the required attribute:

<input type="date" required> 

I tested it in Chrome and it's working fine for me.

like image 93
Tony Avatar answered Sep 16 '22 19:09

Tony