2013-08-05 35 views
0

jquery datepickerhttp://jqueryui.com/datepicker/#method-dialog)使用jQuery的datepicker-月份選擇(無下拉菜單)

我希望有選擇的幾個月和幾年的選項。
我定義的:

$("input").datepicker({ 
      changeMonth: true, 
      changeYear: true, 
     }); 

但我真的很討厭的datepicker的下拉菜單。
我希望有選擇的幾個月和幾年中ajaxToolkit: CalendarExtender

enter image description here

這是可能的選項?

+1

我不認爲jQuery用戶界面的日期選擇器有看法,但也許你會想看看這個插件等[日期選擇器自舉](http://eternicode.github.io/bootstrap-datepicker/) –

+0

謝謝!!!但我想用jQuery UI的,有沒有人有想法? – lealam

回答

1

正如@koala_dev提到的那樣,您可以使用Datepicker來獲得Bootstrap

更新時間:

$("#datepicker").datepicker({ 
 
    format: " m-yyyy", 
 
    viewMode: "months", 
 
    minViewMode: "months" 
 
});
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" /> 
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.0/css/bootstrap-datepicker.css" rel="stylesheet" /> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.0/js/bootstrap-datepicker.js"></script> 
 
<input type="text" id="datepicker" />

+0

小提琴不再工作:/ – SearchForKnowledge

+1

@SearchForKnowledge小提琴中的外部鏈接已過期。現在我已經用cdns修復了。退房 – Praveen

+1

DUH !!!傻了......對不起。謝謝。 +1 – SearchForKnowledge