Update date function to allow user input