Some improvements working with datepicker