Date picker polyfill: Fixed closing on previous menu click (fixes #3869)