Get rid of "undefined index" warning for sdate/edate