ensureDateButtonActive in main.js