Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Datepicker Width

I don't understand why this is so hard to do. Everything about jQuery is so simple. How do you set the width of a jQuery "display: inline;" Datepicker?

I have edited the jquery ui css but as soon as I change the month it resets the width.

I hope this is just something dumb that I'm missing.

like image 725
Greg Avatar asked Nov 21 '11 02:11

Greg


2 Answers

If you are using the jQuery datepicker in its default form, then just add this to your css and it should work:

.ui-datepicker {
width: 17em; /*what ever width you want*/
}
like image 87
Kishore Avatar answered Nov 02 '22 05:11

Kishore


Reducing the font size of the calendar will reduce the width of the date picker.

You can reduce the font size by adding this css:

div.ui-datepicker
{
    font-size:10px;
}
like image 39
Nithin Viswanathan Avatar answered Nov 02 '22 07:11

Nithin Viswanathan