title: How I can I prevent JS error "Expected 'function' at column..."?
body: <p>This is my datepicker:</p>
  
  <pre><code>   $('#daterange-btn').daterangepicker({
          ranges: {
              'Today': [moment(), moment()],
              'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
              'Last 7 Days': [moment().subtract(6, 'days'), moment()],
              'Last 30 Days': [moment().subtract(29, 'days'), moment()],
              'This Month': [moment().startOf('month'), moment().endOf('month')],
              'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
          },
          startDate: moment().subtract(29, 'days'),
          endDate: moment(),
          function (start, end) {
              $('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
          };
      });
  </code></pre>
  
  <p>I get the error message:</p>
  
  <blockquote>
    <p>Expected 'function' at column 9, not column 12  function (start,end){
    Expected an identifier and instead saw 'function' (a reserved word):
    Expected ':' and instead saw '('. Missing space between '(' and
    'start'. 'start' was used before it was defined. Expected 'end' at
    column 9, not column 29.</p>
  </blockquote>