Remove redundant spaces left in formatDate()

This bug put redundant spaces to input element, causing validation error if used under some web framework.
Merge pull request #24 from hongquan/master

Remove redundant spaces left in formatDate()