bootstrap時間コントロール


いくつかのbootstrap時間コントロールの総括記録
githup住所:https://github.com/suidagang/bootsrapdatetimepicker

包みの部分










html
//             
$('#datetimepicker_day').datetimepicker({
    format: 'yyyymmdd',
    weekStart: 1,
    autoclose: true,
    startView: 2,
    minView: 2,
    forceParse: false,
    language: 'zh-CN'
});
//       
$('#datetimepicker_month').datetimepicker({
    language: 'zh-CN',
    format: 'yyyymm',
    weekStart: 1,
    autoclose: true,
    startView: 3,
    minView: 3,
    forceParse: false
});
//     
$('#datetimepicker_year').datetimepicker({
    format: 'yyyymm',
    weekStart: 1,
    autoclose: true,
    startView: 4,
    minView: 4,
    forceParse: false,
    language: 'zh-CN'
});
$("#datetimepicker_year_time").datetimepicker({
    language: 'zh-CN',
    autoclose: true,//             
    clearBtn: false,//    
    todayBtn: true,//    
    format: 'yyyy-mm-dd hh:ii:ss',
    startView: 'month',//     
    minView: 0,//       
    maxView: 1,
    minuteStep: 5, //     1 
    todayHighlight: false,
    forceParse: true,
    endDate: new Date()
}).on('changeDate', function (ev) {
    if (ev.date) {
        $("#eDatePicker").datetimepicker('setStartDate', new Date(ev.date.valueOf()))
    } else {
        $("#eDatePicker").datetimepicker('setStartDate', null);
    }
});
$('input[name="daterange"]').daterangepicker();
//         
$('#rangeTime').daterangepicker({
        timePicker: true,
        timePickerIncrement: 1,
        format: 'MM/DD/YYYY h:mm:ss A'
    }, function (start, end, label) {
        console.log(start.toISOString(), end.toISOString(), label);
});