# Plot not showing in Safari

**URL:** <https://talk.observablehq.com/t/plot-not-showing-in-safari/6913>\
**Category:** Help\
**Created:** [August 11, 2022, 8:31am UTC](https://talk.observablehq.com/t/plot-not-showing-in-safari/6913 "2022-08-11T08:31:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EE2dev](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/ee2dev/32/695_2.png) [@EE2dev](https://talk.observablehq.com/u/EE2dev)\
**Post date:** [August 11, 2022, 8:31am UTC](https://talk.observablehq.com/t/plot-not-showing-in-safari/6913/1 "2022-08-11T08:31:25Z")

</div>

In the notebook:

> **[Plot Exploration: How to customize the calendar visualization?](https://observablehq.com/@ee2dev/plot-exploration-how-to-customize-the-calendar-visualizat)**
>
> I am very excited🕺 about the prospect of using Plot as the go-to tool for interactive data exploration😀. As I am trying to grasp the concept and the mental model behind the Plot API, I am browsing through the observable plot collection going through...

At the bottom, I have a function drawCalendar() which returns a Plot drawing the calendar.  
in Chrome the result is displayed as expected.

But when I open the page on an Iphone with the Safari browser, this cell:

drawCalendar(new Date(“3-8-2022”), new Date(“4-13-2022”))

is not displaying anything.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [August 11, 2022, 10:46am UTC](https://talk.observablehq.com/t/plot-not-showing-in-safari/6913/2 "2022-08-11T10:46:34Z")

</div>

Safari is stricter than Chrome on date parsing, and new Date(“3-8-2022”) returns an Invalid Date.

---

<div class="post-metadata">

**Author:** ![EE2dev](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/ee2dev/32/695_2.png) [@EE2dev](https://talk.observablehq.com/u/EE2dev)\
**Post date:** [August 11, 2022, 11:29am UTC](https://talk.observablehq.com/t/plot-not-showing-in-safari/6913/3 "2022-08-11T11:29:57Z")

</div>

Thanks, I just recall I tripped over it before…

The following Date format seems to works across all browsers:

// “mm/dd/yyyy”  
new Date(“10/26/2020”);

Source: [Javascript's Date() does not work with IE & Safari - Grow Together By Sharing Knowledge](https://techtalkbook.com/javascripts-new-date-does-not-work-on-ie-and-safari/)

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [August 11, 2022, 4:46pm UTC](https://talk.observablehq.com/t/plot-not-showing-in-safari/6913/4 "2022-08-11T16:46:34Z")

</div>

If you’re going to use the Date constructor to parse dates, I recommend using ISO 8601 YYYY-MM-DD, such as `new Date("2022-03-08")`.
