Code refactoring

Code refactoring for debug more conveniently!
More Code Refactoring!
Add Datepicker module and unit test of it!
accept pull request from alfredzh