moved date into click function to be more dynamic