Fixed bug with dismissing date picker