refine custom date_picker code.  fix bug with date_picker in tests.