Pressing ESC now closes the DateField popup when using month or year resolutions. (#12317)

Change-Id: Icf7b8da00e80ea4dc4843bcd28b005b5e91b866f