       @range[0] = moment(d)
       @$body.empty()
 
-      for j in [0..6]
-        for i in [0..7]
+      for j in [0..5]
+        for i in [0..6]
           classes = ['day']
 
           classes.push('first') if i == 0
-          classes.push('last')  if i ==6
+          classes.push('last')  if i == 6
 
           if @now.month() != d.month()
             classes.push('not-in-month')

      collision: 'fit'

    events:
      "mousedown .datepicker-prev": (e) ->
        e.preventDefault()
        @prev()

      "mousedown .datepicker-next": (e) ->
        e.preventDefault()
        @next()

      "mousedown .day": (e) ->
        e.preventDefault()
        @select(e.target.getAttribute("data-datestamp"))


    hidden: false
    autoRender: true
    headerFormat: "MMMM YYYY"
    dateFormat: "MM/DD/YYYY"
    firstDayOfWeek: 1
    linkTemplate: null

