Pass formatted date in to the js popup template