In my bean, I'm formatting a date as a string:
public void setStrDate(Date dte) {
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
this.strDate = df.format(dte);
}
In my js file, I'm grabbing the data:
$('#content').data("myDate", <c:out value="${myBean.strDate}"/>);
And in my js, displaying the data:
$('#sideBar').find("p[class=stat]").append($('#content').data("myDate"));
The date comes over as 10/10/2014. I even see it in the developer tools this way: $('#content').data("myDate", 10/10/2014);
But on the webpage, it shows up as 0.0004965243296921549
How can I format this?