added code for choose date