I m trying to work with dangrossman/bootstrap-daterangepicker. Daterange picker did not open? I just put example code to try that. But it did't. What is the wrong part?
我在尝试和dangrossman/bootstrap-daterangepicker一起工作。Daterange picker没有打开?我只是用示例代码来尝试一下。但它确实。哪里出了问题?
$(function() {
$('#reservationtime').daterangepicker({
timePicker: true,
timePickerIncrement: 30,
format: 'MM/DD/YYYY h:mm A'
});
});
Fiddle is here: http://jsfiddle.net/nle41/skwjo689/
小提琴是:http://jsfiddle.net/nle41/skwjo689/
1 个解决方案
#1
1
You need to load moment.js before loading daterangepicker.js.
你需要加载力矩。在装货前js daterangepicker.js。
Separately, you have a syntax error in your enclosing function declaration.
另外,在封装函数声明中有语法错误。
Working fiddle: http://jsfiddle.net/skwjo689/1/
工作小提琴:http://jsfiddle.net/skwjo689/1/
$('#reservationtime').daterangepicker({ timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A' });
Be sure to open your brower's console window to get information about any errors that might be occurring, and considering posting error information with future questions.
一定要打开浏览器的控制台窗口来获取可能发生的任何错误的信息,并考虑在将来的问题中发布错误信息。
#1
1
You need to load moment.js before loading daterangepicker.js.
你需要加载力矩。在装货前js daterangepicker.js。
Separately, you have a syntax error in your enclosing function declaration.
另外,在封装函数声明中有语法错误。
Working fiddle: http://jsfiddle.net/skwjo689/1/
工作小提琴:http://jsfiddle.net/skwjo689/1/
$('#reservationtime').daterangepicker({ timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A' });
Be sure to open your brower's console window to get information about any errors that might be occurring, and considering posting error information with future questions.
一定要打开浏览器的控制台窗口来获取可能发生的任何错误的信息,并考虑在将来的问题中发布错误信息。