我对gem'jquery-datepicker'有问题。我在application.js中的代码如下所示:
//= require highcharts/highcharts.js
//= require highcharts/highcharts-more.js
//= require highcharts/highstock.js
//= require highcharts/modules/exporting.js
//= require jquery
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require_tree .
//= require_self
$(function() {
$( ".datepicker_von" ).datepicker({·
dateFormat: "dd.mm.yy",
minDate: (new Date(2014,2,5)),
maxDate: 0,
showAnim: "slideDown",
changeMonth: true,
changeYear: true,
showOtherMonths: true,·
selectOtherMonths: true,
});
$( ".datepicker_bis" ).datepicker({·
dateFormat: "dd.mm.yy",
minDate: (new Date(2014,2,5)),
maxDate: 0,
showAnim: "slideDown",
changeMonth: true,
changeYear: true,
showOtherMonths: true,·
selectOtherMonths: true,
});
})
在开发环境中,也会出现datepicker,但在生产环境中却没有。现在,当我将application.js // = require_self更改为开头时:
//= require_self
//= require highcharts/highcharts.js
//= require highcharts/highcharts-more.js
//= require highcharts/highstock.js
//= require highcharts/modules/exporting.js
//= require jquery
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require_tree .
它适用于生产环境,但不适用于开发环境。我绝望并需要帮助。
提前致谢,抱歉我的英语不好。
问候!