Fixing date bug

- date length must equal 2
- set minDate and maxDate