updated date picker functionality