app only closes modals if current date is greater than end date