来自datetimepick的chartkick的动态日期更改

时间:2017-07-12 08:26:59

标签: ruby-on-rails datetimepicker chartkick

我有以下代码:

organization.html.erb

<div class="phonechart">
  <h3>Phone</h3>
  <%= line_chart @organization.statistics.with_kind(:phone).group_by_day(:created_at, range: Time.new(2016)..Time.new(2017)).count %>
</div>

organization.js

    function init_statistics_features() {

  $('#datetimepicker8').datetimepicker({
  }).on('dp.change', function(e){

  });

  $('#enddate').datetimepicker({
  }).on('dp.change', function(e){});

}

如何使用datetimeficker动态更改日期?

0 个答案:

没有答案