How to set default size for jquery datepicker?
Take a look on this page . The date picker itself (called <div id="calendar"> ) has a width of "68em". Then I use $("#calendar").children().css("width","auto"); to set the width to auto (so that it fills the page). As you can see, this works. However, changing the month (using the buttons) causes jQuery to change the width backward. Is there a proper way to fix this?
You can set the width to a fixed value only with CSS.
If you want to use Javascript to set the width of #calendar, you must attach the JS resize function to the onChangeMonthYear event.
From jQuery UI site :
$('.selector').datepicker({ onChangeMonthYear: function(year, month, inst) { ... } });