3.0 datetime fixes

Fix a few more problems with datetime related input generation with input() and datetime(). Related to #2267.