在时间选择器的扩展方法中获取错误"'datepicker._defaults' is null or not an object".js



我正在使用Jquery datetimepicker(js/timepicker.js)在以下javascript文件的扩展方法中得到错误"datepicker.defaults'为null或不是对象"

加载timepicker.js文件时出错。'javascript文件中未定义datepicker对象。

===================timepicker.js===============
    /**
     * Extending default values
     */
    $.extend($.datepicker._defaults, {
        'stepMinutes': 1, // Number of minutes to step up/down
        'stepHours': 1, // Number of hours to step up/down
        'time24h': false, // True if 24h time
        'showTime': false, // Show timepicker with datepicker
        'altTimeField': '' // Selector for an alternate field to store time into
    }); 

您需要首先包含"jquery-ui-1.7.2.custom.min.js",然后包含"timepicker.js"文件

相关内容

最新更新