added datepicker functionality and patient history dialog