Bug fix: null exception error when date input is invalid