Datepicker initialization fix