[BUG #8764] Using forEach that this contains the correct context while rendering calendar widget