     @pageYears 1
   
   pickYear: (year)-> =>
-    @changeValue -> @year year
+    @modifyValue -> @year year
     @setState view: "days"
   
   render: ->

  ]
  
  pickMon: (mon)-> =>
    @changeValue -> @month mon
  
  render: ->
    datetime = do @getMoment

    # Set new value and call onChange handler
    @setState {value}, @props.onChange if value? and value isnt @state.value
  
  modifyValue: (fn)->
    datetime = do @getMoment
    fn.call datetime
    @setValue datetime.format @props.format
  
  parseFormat: (format)->
    format.split formatRegex
