How to remove blue cross on datetime local HTML input in Chrome 27?

I used the datetime-local input, but since the advent of Chrome v27 a blue cross appears, which allows you to clear the selected time. I do not want this and return to the input that we had with chrome 26.

This is how I define input:

<input type="datetime-local" value="1985-04-12T23:20:50.52"/> 

Take a look at this jsFiddle . Open it with Chrome 27 to see the blue cross.

Do you know how to remove this blue cross?

Edit:

As a temporary workaround, I turned off the blue cross function, resetting the value if the new one was cleared ( see it in JSFiddle )

 $('input#testInput').on('change', function(event) { var newValue = $('input#testInput').val(); if(!newValue || newValue === "") { $('input#testInput').val(lastValue); } else lastValue = newValue; }); 

This really does not meet the initial need, so I'm still looking for a good solution.

+10
source share
2 answers

You must use the required attribute.

+12
source

Here's how you remove the cross and arrows:

 input::-webkit-outer-spin-button, /* Removes arrows */ input::-webkit-inner-spin-button, /* Removes arrows */ input::-webkit-clear-button { /* Removes blue cross */ -webkit-appearance: none; margin: 0; } 
+35
source

All Articles