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

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

$.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();            },            //tab: function (widget) { //this break the flow of the form. disabling for now            //    var toggle = widget.find('.picker-switch a[data-action="togglePicker"]');            //    if(toggle.length > 0) toggle.click();            //},            '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/

你可能感兴趣的文章
MySQL 错误
查看>>
mysql 随机数 rand使用
查看>>
MySQL 面试题汇总
查看>>
MySQL 面试,必须掌握的 8 大核心点
查看>>
MySQL 高可用性之keepalived+mysql双主
查看>>
MySQL 高性能优化规范建议
查看>>
mysql 默认事务隔离级别下锁分析
查看>>
Mysql--逻辑架构
查看>>
MySql-2019-4-21-复习
查看>>
mysql-5.6.17-win32免安装版配置
查看>>
mysql-5.7.18安装
查看>>
MySQL-Buffer的应用
查看>>
mysql-cluster 安装篇(1)---简介
查看>>
mysql-connector-java.jar乱码,最新版mysql-connector-java-8.0.15.jar,如何愉快的进行JDBC操作...
查看>>
mysql-connector-java各种版本下载地址
查看>>
mysql-EXPLAIN
查看>>
MySQL-Explain的详解
查看>>
mysql-group_concat
查看>>
MySQL-redo日志
查看>>
MySQL-【1】配置
查看>>