             eventObject.target.value = day
             @props.onChange(eventObject)
 
+
     onChange: (view)->
         console.log "DatePicker onChange view: #{view}"
         @setState
             #selected: DateUtilities.clone view
             view: DateUtilities.clone view
-        @onSelect DateUtilities.clone view
+        @selectDate DateUtilities.clone view
 
     show: ->
         trigger = this.refs.trigger

            @state.selected

    hide: ->
        @refs.calendar.hide()

    render: ->

        @setState { maxDate: date }

    onSelect: (day)->
        @hide()
        @selectDate(day)

    selectDate: (day)->
        this.setState { selected: day }
        console.log "### selectDate clicked: clicked on onSelect #{day}"

        if this.props.onSelect
            this.props.onSelect(day)
