fix updating selectedDate