博客
关于我
bootstrap-datetimepicker 配置全面指南 ( version : 4.17.47 )
阅读量:302 次
发布时间:2019-03-01

本文共 5504 字,大约阅读时间需要 18 分钟。

日期时间选择器默认配置

$.fn.datetimepicker.defaults = {    timeZone: '',    format: false,    dayViewHeaderFormat: 'MMMM YYYY',    extraFormats: false,    stepping: 1,    minDate: false,    maxDate: false,    useCurrent: true,    collapse: true,    locale: moment.locale(),    defaultDate: false,    disabledDates: false,    enabledDates: false,    icons: {        time: 'glyphicon glyphicon-time',        date: 'glyphicon glyphicon-calendar',        up: 'glyphicon glyphicon-chevron-up',        down: 'glyphicon glyphicon-chevron-down',        previous: 'glyphicon glyphicon-chevron-left',        next: 'glyphicon glyphicon-chevron-right',        today: 'glyphicon glyphicon-screenshot',        clear: 'glyphicon glyphicon-trash',        close: 'glyphicon glyphicon-remove'    },    tooltips: {        today: 'Go to today',        clear: 'Clear selection',        close: 'Close the picker',        selectMonth: 'Select Month',        prevMonth: 'Previous Month',        nextMonth: 'Next Month',        selectYear: 'Select Year',        prevYear: 'Previous Year',        nextYear: 'Next Year',        selectDecade: 'Select Decade',        prevDecade: 'Previous Decade',        nextDecade: 'Next Decade',        prevCentury: 'Previous Century',        nextCentury: 'Next Century',        pickHour: 'Pick Hour',        incrementHour: 'Increment Hour',        decrementHour: 'Decrement Hour',        pickMinute: 'Pick Minute',        incrementMinute: 'Increment Minute',        decrementMinute: 'Decrement Minute',        pickSecond: 'Pick Second',        incrementSecond: 'Increment Second',        decrementSecond: 'Decrement Second',        togglePeriod: 'Toggle Period',        selectTime: 'Select Time'    },    useStrict: false,    sideBySide: false,    daysOfWeekDisabled: false,    calendarWeeks: false,    viewMode: 'days',    toolbarPlacement: 'default',    showTodayButton: false,    showClear: false,    showClose: false,    widgetPositioning: {        horizontal: 'auto',        vertical: 'auto'    },    widgetParent: null,    ignoreReadonly: false,    keepOpen: false,    focusOnShow: true,    inline: false,    keepInvalid: false,    datepickerInput: '.datepickerinput',    keyBinds: {        up: function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().subtract(7, 'd'));            } else {                this.date(d.clone().add(this.stepping(), 'm'));            }        },        down: function (widget) {            if (!widget) {                this.show();                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().add(7, 'd'));            } else {                this.date(d.clone().subtract(this.stepping(), 'm'));            }        },        'control up': function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().subtract(1, 'y'));            } else {                this.date(d.clone().add(1, 'h'));            }        },        'control down': function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().add(1, 'y'));            } else {                this.date(d.clone().subtract(1, 'h'));            }        },        left: function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().subtract(1, 'd'));            }        },        right: function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().add(1, 'd'));            }        },        pageUp: function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().subtract(1, 'M'));            }        },        pageDown: function (widget) {            if (!widget) {                return;            }            var d = this.date() || this.getMoment();            if (widget.find('.datepicker').is(':visible')) {                this.date(d.clone().add(1, 'M'));            }        },        enter: function () {            this.hide();        },        escape: function () {            this.hide();        },        'control space': function (widget) {            if (!widget) {                return;            }            if (widget.find('.timepicker').is(':visible')) {                widget.find('.btn[data-action="togglePeriod"]').click();            }        },        t: function () {            this.date(this.getMoment());        },        'delete': function () {            this.clear();        }    },    debug: false,    allowInputToggle: false,    disabledTimeIntervals: false,    disabledHours: false,    enabledHours: false,    viewDate: false};        

转载地址:http://ywea.baihongyu.com/

你可能感兴趣的文章
Python到底能做什么?它的优点在哪?
查看>>
python利用pytorch库导出图像分割算子
查看>>
python利用pyshark监听网卡来抓包其中pyshark中摸索的一些可用参数
查看>>
python利用excel分析过杀漏失
查看>>
python判断汉字数目
查看>>
python判断文件是空的,如果是空的,就删除
查看>>
python判断密码是否正确_python密码判断是否符合要求的方法
查看>>
python判断字符串包含中文_Python 判断字符串是否包含中文
查看>>
python删除第一行_Python 乱码指北:一行删掉根目录
查看>>
Python删除列表元素的三种方法
查看>>
python初步学习-python数据类型-集合(set)
查看>>
python列表生成字典_Python中将字典转换为列表的方法
查看>>
python列表对应元素合并为列表及判断一个列表是几维
查看>>
python+flask计算机毕业设计骨科门诊患者档案管理系统(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校体测管理系统的设计与实现(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校体育赛事系统(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校危化品管理系统(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校校园线上跳蚤市场的系统设计(程序+开题+论文)
查看>>
python+flask计算机毕业设计高校疫情防控管理平台(程序+开题+论文)
查看>>
Python+Jenkins+Allure Report接口自动化测试持续集成
查看>>