CRM-15689 - Fix js error in dateField initialization