added validity check for date override