hash generate datepicker almost working