3 回答

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超4個(gè)贊
Bootstrap-DateTimePicker是基于Bootstrap3的日期-時(shí)間選擇器控件,允許自定義時(shí)間選擇器圖標(biāo),設(shè)置圖標(biāo)是否顯示,自定義日期顯示格式,禁用日期選擇器,設(shè)置是否禁用日期選擇器、時(shí)間選擇器、分鐘選擇器、秒選擇器,設(shè)置日期的數(shù)據(jù)范圍。
$.fn.datetimepicker.defaults = {
pickDate: true, //en/disables the date picker
pickTime: true, //en/disables the time picker
useMinutes: true, //en/disables the minutes picker
useSeconds: true, //en/disables the seconds picker
useCurrent: true, //when true, picker will set the value to the current date/time
minuteStepping:1, //set the minute stepping
minDate:`1/1/1900`, //set a minimum date
maxDate: , //set a maximum date (defaults to today +100 years)
showToday: true, //shows the today indicator
language:’en’, //sets language locale
defaultDate:”", //sets a default date, accepts js dates, strings and moment objects
disabledDates:[], //an array of dates that cannot be selected
enabledDates:[], //an array of dates that can be selected
icons = {
time: ‘glyphicon glyphicon-time’,
date: ‘glyphicon glyphicon-calendar’,
up: ‘glyphicon glyphicon-chevron-up’,
down: ‘glyphicon glyphicon-chevron-down’
}
useStrict: false, //use “strict” when validating dates
sideBySide: false, //show the date and time picker side by side
daysOfWeekDisabled:[] //for example use daysOfWeekDisabled: [0,6] to disable weekends
};
- 3 回答
- 0 關(guān)注
- 917 瀏覽
添加回答
舉報(bào)