that worked perfect with the events, however I have regular posts mixed in with my relationship field. That code made all of the posts go away, and it only showed non expired events.
Can that code be set to only work with event post types, not regular wordpress posts.