added button functionality to swap dates