only apply datespan filter if valid

http://manage.dimagi.com/default.asp?102964