fix bug where from date can be after the to date
Make the from and to date required