Optimized calendarWidget function regardless of whether it works or not