window.BeefCake ?= {}

class BeefCake.Base
  @datepicker = (obj) ->
    nowTemp = new Date
    nowTemp.setDate(nowTemp.getDate() + 1)
    now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0)
    obj.datepicker(onRender: (date) ->
      if date.valueOf() < now.valueOf() then 'disabled' else ''
    )
