Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 date input width

Tags:

So i am having an issue trying to force a size on a date input. Has anyone else had this issue or know how to get around it?

<input style="width:50px;" type="date" value="">

It is pretty simple, the width only changes the textarea, the actual control does not change, it is fixed at about 125 px width or so.

I have also tried width="" and max-width in the css, neither work.

like image 760
Austin Best Avatar asked Feb 13 '13 17:02

Austin Best


People also ask

How do you change the input width in HTML?

1. Set width in HTML. In HTML, you can use the width attribute to set the width of an element. Alternatively, you can also use the size attribute to define the width of the <input> .

How can set input type date in mm/dd/yyyy format using HTML?

To set and get the input type date in dd-mm-yyyy format we will use <input> type attribute. The <input> type attribute is used to define a date picker or control field. In this attribute, you can set the range from which day-month-year to which day-month-year date can be selected from.

Which HTML5 attributes can be used with HTML5 date input type to limit date selection?

The max attribute specifies the maximum value (date) for a date field. Tip: Use the max attribute together with the min attribute to create a range of legal values. Tip: To set or return the value of the min attribute, use the min property.

How do you set the height and width of input type text in HTML?

If you simply want to specify the height and font size, use CSS or style attributes, e.g. //in your CSS file or <style> tag #textboxid { height:200px; font-size:14pt; } <!


1 Answers

With chrome 45, I just set the font-size. It proportionately changed the text and the control handles. Not sure that was the effect you were looking for(?).

<input style="font-size: 3rem"  type="date" id="Date">
like image 110
GeorgeG Avatar answered Oct 01 '22 14:10

GeorgeG