Google Charts not displaying in Safari

One of the personal projects I have uses Google Charts to provide some data visualization, but the chart data wasn't rendering in Safari (Mobile or Desktop). The fix was pretty simple, but it took some searching to find a suitable answer.

In my case, I was using a date on the x-axis to show a timeseries, but Safari's new Date object doesn't like dates in the format of YYYY-MM-DD (as explained in more detail over on Stack Overflow). Luckily, I already had moment.js included on my pages, so I could simply moment("YYYY-MM-DD")._d (I'm sure there's a better way to get the underlying Date object, but this worked for my needs), and chart data now renders properly on Safari.

If this post helps you out, please drop a comment.