anchor.diff:    var form = $("#timeframe-form");
   
     function updateDateRange(from, to) {
  -    form.find("input[name=from]").val(from.format("YYYY-MM-DD HH:00"));
  -    form.find("input[name=to]").val(to.format("YYYY-MM-DD HH:00"));
  -    $("#daterangepicker .display").text(from.format("YYYY-MM-DD") + " - " + to.format("YYYY-MM-DD"));
  +    from = from.format("YYYY-MM-DD HH:00");
  +    to = to.format("YYYY-MM-DD HH:00")
  +    form.find("input[name=from]").val(from);
  +    form.find("input[name=to]").val(to);
  +    $("#daterangepicker .display").text(from + " - " + to);
     };
   
     $("#daterangepicker").daterangepicker({
  
positive.code:       <div id="daterangepicker" class="input-group">
          <div class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></div>
          <div class="form-control display">
            <%= @timeseries.from_truncated.strftime("%Y-%m-%d") %> - <%= @timeseries.to_truncated.strftime("%Y-%m-%d") %>
          </div>
        </div>
  
  
negative.code:     minDate: "2011-07-01",
      opens: "center",
      locale: {
        format: "YYYY-MM-DD HH:00"
      },
      startDate: '<%= @timeseries.from_truncated.strftime("%Y-%m-%d %H:%M") %>',
      endDate: '<%= @timeseries.to_truncated.strftime("%Y-%m-%d %H:%M") %>',
  