added validation for date, and default date