Set model date defaultValue to string
<p>I try to build a 'task manager' to log the tasks that my customers send me.</p>

<p>I have my new-task.hbs form</p>

<pre><code>&lt;div id="new-task-form" class="col-md-12"&gt;
&lt;form&gt;
    &lt;div class="form-group"&gt;
        &lt;label&gt;Customer&lt;/label&gt;
        {{input type="text" class="form-control" value=customer placeholder="Add Customer..."}}
    &lt;/div&gt;

    &lt;div class="form-group"&gt;
        &lt;label&gt;Task&lt;/label&gt;
        {{textarea class="form-control" value=task placeholder="Add Task..."}}
    &lt;/div&gt;

    &lt;div class="form-group"&gt;
        &lt;label&gt;Incoming&lt;/label&gt;
        {{input type="number" class="form-control" value=incoming placeholder="Bring it on..."}}
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
        &lt;label&gt;Pending&lt;/label&gt;
        {{input type="number" class="form-control" value=pending placeholder="Don't bring it on..."}}
    &lt;/div&gt;

    &lt;div class="form-group"&gt;
        &lt;label&gt;Closed Date&lt;/label&gt;
        {{input type="date" class="form-control" value=closed_date placeholder="Please close me..."}}
    &lt;/div&gt;

    &lt;button {{action 'addTask'}} class="btn btn-primary"&gt;Submit&lt;/button&gt; 
&lt;/form&gt;
</code></pre>

<p></p>

<p>My controller.</p>

<pre><code>    import Ember from 'ember';

export default Ember.Controller.extend({
    actions: {
        addTask: function(){
            var customer = this.get('customer');
            var task = this.get('task');
            var incoming = this.get('incoming');
            var pending = this.get('pending');
            var closed_date = this.get('closed_date');
            //Create new task
            var newTask = this.store.createRecord('task',{
                customer: customer,
                task: task,
                incoming: incoming,
                pending: pending,
                closed_date: closed_date
            });
            //save to db
            newTask.save();
        }
    }
});
</code></pre>

<p>And the model</p>

<pre><code>import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  customer: attr('string'),
  task: attr('string'),
  incoming: attr('number', { defaultValue: 0 }),
  pending: attr('number', { defaultValue: 0 }),
  closed_date: attr('date'),
  created: attr('string', {
    defaultValue: function(){
        return new Date();
    }
  })  
});
</code></pre>

<p>How can i set a model defaultValue for a the closed_date input to a string "Not entered yet"? </p>

<p>If i leave it like this and not enter a value i get an "Invalid Date".</p>

<pre><code>closed_date: attr('date')
</code></pre>

<p>If i set this i get the current date.</p>

<pre><code>closed_date: attr('date', { defaultValue: 'Not entered yet' })
</code></pre>