title: momentjs and null dates
body: <p>I have the following code that is linked to a date slider, i've done a bit of digging and can find many items on validation but not on returning null data.</p>
  
  <p>as this project was inherited i have no fallback documents to review internally and i'm new(ish) to coding javascript.</p>
  
  <p>is anyone able to advise me if moment.js can also allow the return of null data as it would seem historically the table where the data is queried never contained nulls but legitimately does now (great)</p>
  
  <p>thanks for any hints tips on controlling this in advance </p>
  
  <pre><code>initializeDateSlider: function(minDate, maxDate, startDate, endDate, stepType, step) {
  var interval = MapsLib.sliderInterval(stepType);
  
  $('#minDate').html(minDate.format('MMM YYYY'));
  $('#maxDate').html(maxDate.format('MMM YYYY'));
  $('#startDate').html(startDate.format('DD MMM YYYY'));
  $('#endDate').html(endDate.format('DD MMM YYYY'));
  $('#date-range').slider({
  range: true,
  step: step,
  values: [ Math.floor((startDate.valueOf() - minDate.valueOf()) / interval),
  Math.floor((maxDate.valueOf() - minDate.valueOf()) / interval) ],
    max: Math.floor((maxDate.valueOf() - minDate.valueOf()) / interval),
    slide: function(event, ui) {
  $('#startDate').html(minDate.clone().add(stepType, ui.values[0]).format('DD MMM YYYY'));
  $('#endDate').html(minDate.clone().add(stepType, ui.values[1]).format('DD MMM YYYY'));
    },
  </code></pre>