Datepicker module pattern