Edited working datepicker