     yearStart: '1960',
     yearEnd: current_year,
     onShow: (dp,$input) ->
-      if $input.hasClass('temporal-range-start') and $('input.temporal-range-stop').val()
-        this.setOptions({
-          minDate: false,
-          maxDate: $('input.temporal-range-stop').val().split(' ')[0],
-          formatDate: 'Y-m-d'
-        })
-      else if $input.hasClass('temporal-range-stop') and $('input.temporal-range-start').val()
-        this.setOptions({
-          maxDate: false,
-          minDate: $('input.temporal-range-start').val().split(' ')[0],
-          formatDate: 'Y-m-d'
-        })
+      if $input.hasClass('temporal-range-start')
+        if $('input.temporal-range-stop').val()
+          min_date = false
+          max_date = $('input.temporal-range-stop').val().split(' ')[0]
+        else
+          min_date = false
+          max_date = false
+      else if $input.hasClass('temporal-range-stop')
+        if $('input.temporal-range-start').val()
+          min_date = $('input.temporal-range-start').val().split(' ')[0]
+          max_date = false
+        else
+          min_date = false
+          max_date = false
+
+      this.setOptions({
+        minDate: min_date,
+        maxDate: max_date,
+        formatDate: 'Y-m-d'
+      })
     onChangeDateTime: (dp,$input) ->
       # Default minutes and seconds to 00
       datetime = $input.val().split(":")

      updateQueryModel('range-start', '')
      updateQueryModel('range-stop', '')
      updateTemporalRecurring()

    yearStart: current_year,
    yearEnd: current_year,
    onShow: (dp,$input) ->
      updateMonthButtons($(this).find('.xdsoft_month'))

      if $input.hasClass('temporal-recurring-start')
        if $('input.temporal-recurring-stop').val()
          min_date = false
          max_date = $('input.temporal-recurring-stop').val().split(' ')[0]
        else
          min_date = false
          max_date = false
      else if $input.hasClass('temporal-recurring-stop')
        if $('input.temporal-recurring-start').val()
          min_date = $('input.temporal-recurring-start').val().split(' ')[0]
          max_date = false
        else
          min_date = false
          max_date = false

      this.setOptions({
        minDate: min_date,
        maxDate: max_date,
        formatDate: 'm-d'
      })
    onChangeDateTime: (dp,$input) ->
      # Default minutes and seconds to 00
      datetime = $input.val().split(":")
      datetime[1] = "00"
      datetime[2] = "00"
      $input.val(datetime.join(":"))
    onChangeMonth: (dp,$input) ->
      updateMonthButtons($(this).find('.xdsoft_month'))
  })

  $('.temporal-recurring-year-range').slider({
