The only thing that I need showing up in the box there is the orange triangle, and I am not sure if I need CSS or something else to get rid of the two elements to the left of the triangle.
Is there a way to do so? I am just using the input type date
.
Fiddle: http://jsfiddle.net/5M2PD/1/
Use the pseudo-class
-webkit-inner-spin-button
to style it specific for webkit-based browsers:http://jsfiddle.net/5M2PD/2/
If you want to change the style of the dropdown arrow, use the pseudo-class
-webkit-calendar-picker-indicator
:To eliminate the clear button, set the input to required:
http://jsfiddle.net/5M2PD/3/
To remove the clear button, use this:
As a side note, to do this in IE10+ (source), use this:
Note that this one works on
<input type="text" />
, since IE now places a clear button there as well.To style the rest of the date control in WebKit browsers, I would recommend having a look at this link. To summarize it, you can play with the following pseudo classes:
I would also highly recommend using the following in order to turn off the default browser styles; I've found this to be especially useful when working with mobile browsers: