Skip to content

Instantly share code, notes, and snippets.

@piotrze
Created November 7, 2012 21:24
complicated UI controll designed with if/else
# no bueno
class DateWidget
constructor: ->
@firstLevel = true
@fromDate = null
@toDate = null
fillFromDate: ->
if @firstLevel
#initialize fromDate and toDate day selects
else if @fromDate
#do some
else if @toDate
#do something else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment