2012-08-15 102 views
0
<input type="text" id="txtDateTo1" size="7"> 

$('#myDatePicker').datepicker({changeMonth: true, changeYear: true, yearRange: '2010:2013'}); 

我的輸入框包含在絕對定位的DIV中。jquery datepicker在IE8中更改下拉寬度

在IE8中,月份和年份的下拉菜單過於寬泛。鉻在它看起來很好。

如何強制兩個下拉選擇正確的寬度?甚至只是將像素設置爲固定。

enter image description here


enter image description here

回答

2

您的具體寬度只需添加這兩個CSS類。

select.ui-datepicker-month 

select.ui-datepicker-year 
+0

在我的CSS中,我添加了select.ui-datepicker-month {width:500px;},但是沒有任何變化......即使在chrome中。 500,1000,20,沒有什麼區別。 – adam 2012-08-15 16:10:04

+0

select.ui-datepicker-month {width:500px!important;}怎麼樣? – zen 2012-08-15 16:15:47

+0

做到了!謝謝! – adam 2012-08-15 16:18:14