       scope.position = date.toDate()
 
 
-    ###
-      Helper method that split the steps by week
-    ###
+    #
+    # Compute a boolean value that indicate if
+    # switching to the next view would put the
+    # cursor on a date after maxDate.
+    #
+    # Returns true if maxDate is not defined.
+    #
+    canNextView = ->
+      if not scope.maxDate?
+        return true
+      else
+        return moment(scope.selected).add(steps[scope.view].next).isBefore(scope.maxDate)
+
+    #
+    # Compute a boolean value that indicate if
+    # switching to the previous view would put the
+    # cursor on a date before minDate.
+    #
+    # Returns true if minDate is not defined.
+    #
+    canPreviousView = ->
+      if not scope.minDate?
+        return true
+      else
+        return moment(scope.selected).add(steps[scope.view].previous).isAfter(scope.minDate)
+
+    #
+    #  Helper method that split the steps by week
+    #
     splitByWeeks = (steps = []) ->
+      return if not scope.steps?
+
       lastWeek = null
       stepsByWeek = []
       for step in steps

      -steps[scope.view].line

    scope.keyPress = ($event) ->

      selected = moment(scope.selected)

      switch $event.keyCode

                       data-ng-repeat="step in steps"
                       data-ng-class="{active: step.active, past: step.past, future: step.future, disabled: !step.selectable}"
                       data-ng-click="select(step,$event)"
                       data-ng-mouseenter="hover(step,$event)">{{ step.formatted }}</span>
           </td>
       </tr>
       <tr data-ng-if="view === 'day'" data-ng-repeat="weeks in byWeeks">
           <td data-ng-repeat="step in weeks"
               data-ng-click="select(step,$event)"
               data-ng-mouseenter="hover(step,$event)"
               class="day"
             data-ng-class="{active: step.active, past: step.past, future: step.future, disabled: !step.selectable}">{{ step.formatted }}</td>
       </tr>
