Add a function for date input according to the Gregorian calendar