title: Is there a way to pass a date value into the min and max attributes of the controller options in a vis.js timeline?
body: <p>I'm trying to set the range of the visible timeline in vis.js such that the earliest date passed from my data set is the far left range and the most recent date passed from my data set is the far right range. </p>
  
  <p>I've already found a way to sort my data in timeline order (they are an array of objects with more than just date as an attribute, but I need to sort the array by only the date attribute), but when I try to pass the earliest and most recent dates into the min/max in .options, it throws an undefined variable error. </p>
  
  <p>I know that the problem is that the controller loads first when the page is loaded and the function that the array is being created loads second and that is why the variables are showing as undefined, but I can't figure out a solution.</p>
  
  <p>I also have noted from much research that the only examples of using the min and max attributes in .options are always hardcoded values. I need to be able to pass values in based on a data set given, so hardcoding values will not work for my solution. finalMin and finalMax are variables that are in proper date format.</p>
  
  <pre><code>ctrl.finalMin;
  ctrl.finalMax;
  ctrl.options = {
      min: new Date(ctrl.finalMin),
      max: new Date(ctrl.finalMax),
      zoomable: false,
      height: '100%',
      style: 'bar',
      drawPoints: false,
      };
  </code></pre>
  
  <p>So, finalMin and finalMax are variables that are used later in another function to get the earliest and most recent dates from the data set. I expect the timeline to reflect the visible range of values to begin at finalMin and end at finalMax. Help?</p>