我按照https://github.com/eternicode/bootstrap-datepicker 的指南執行簡單的startDate/endDate數據圖佈局。Bootstrap datepicker - 請具體說明,因爲其他示例過於通用
我從小提琴的例子中複製了代碼,但它不起作用。
我是否需要導入CSS才能使其工作? 如果它不是CSS的問題,比那是什麼阻止了數據採集器顯示?
這是代碼的一部分: $( '#日期啓動')日期選擇器()上( 'CHANGEDATE',函數(EV){
if (ev.date.valueOf() > endDate.valueOf()){
$('#alert').show().find('strong').text('The start date must be before the end date.');
} else {
$('#alert').hide();
startDate = new Date(ev.date);
$('#date-start-display').text($('#date-start').data('date'));
}
$('#date-start').datepicker('hide');
});
這是小提琴例子。
http://jsfiddle.net/wadvc/
Uncaught TypeError:Object [object Object]沒有方法'datepicker' - 這意味着您最有可能沒有TBS。 – 2013-05-06 17:32:48