context = window
rest = window.JK.Rest()
logger = context.JK.logger

@YearSelect = React.createClass({


  render: () ->
    options = []
    
    now = new Date().getFullYear()
    options.push `<option key="now" value="0">Now</option>`
    for yr in [now..1916]
      options.push `<option key={yr} value={yr}>{yr}</option>`

    if this.props?.defaultPresent
      defaultValue = '0'
    else
      defaultValue = now

    `<select className="YearSelect react-component" name={this.props.name} required placeholder="Select" defaultValue={defaultValue}>
       {options}
     </select>`
})