The dialog box now correctly changes the dates when instructed