How to replace a default date with an empty string
<p>I have a html span that display a date using moment.js in the page:</p>

<pre><code>&lt;span data-bind="text: moment(new Date(dueDate())).format('MM/DD/YYYY')"&gt;&lt;/span&gt;
</code></pre>

<p>It's working fine apart if the <code>dueDate()</code> property is an empty string, If it's an empty string I'm getting:</p>

<blockquote>
  <p>01/01/1900</p>
</blockquote>

<p>How can avoid that?</p>

<p>This is the entire div:</p>

<pre><code>&lt;div class="col-md-8"&gt;
    &lt;ul&gt;
      &lt;li&gt;DATE &lt;span data-bind="text: moment(new Date(sDate())).format('MM/DD/YYYY')"&gt;&lt;/span&gt;&lt;/li&gt;
      &lt;li&gt;Due date &lt;span&gt;&lt;/span&gt;&lt;span data-bind="text: moment(new Date(dueDate())).format('MM/DD/YYYY')"&gt;&lt;/span&gt;
           &lt;p&gt;Days Remaining: &lt;span class="days-remaining" data-bind="text: daysRemaining"&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;Date 2 &lt;span&gt;&lt;/span&gt;&lt;span data-bind="text: moment(new Date(date2())).format('MM/DD/YYYY')"&gt;&lt;/span&gt;
           &lt;p&gt;Days Remaining: &lt;span class="days-remaining" data-bind="text: daysRemaining"&gt;&lt;/span&gt;&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>