title: SQLite Date type only accepts Python date objects as input
body: <p>I have a problem with SQLAlchemy<br></p>
  
  <blockquote>
    <p>SQLite Date type only accepts Python date objects as input.[SQL: 'UPDATE records SET timestamp=?][parameters: [{'timestamp': (datetime.date(2017, 6, 15),)}]]<br></p>
  </blockquote>
  
  <p>This is my Forms.py</p>
  
  <pre><code>class DataForm(FlaskForm):        
      timestamp = DateField("date", validators=[Required()])
  
  class ModifyDataForm(FlaskForm):
      timestamp = DateField("date", validators=[Required()])
  </code></pre>
  
  <p>This is my Models.py</p>
  
  <pre><code>class Record(db.Model):
      timestamp = db.Column(db.Date, default=date.today, index=True)
  </code></pre>
  
  <p>Views.py</p>
  
  <pre><code>def create():
      form = DataForm()
      if form.validate_on_submit():
          record = Record(timestamp=form.timestamp.data,)
  
  def modify(id):
      record = Record.query.get_or_404(id)
      form = ModifyDataForm(record)
      if form.validate_on_submit():
          record.timestamp = form.timestamp.data,
      form.timestamp.data = record.timestamp
  </code></pre>
  
  <p>Template I use bootstrap's wtf.html</p>
  
  <p>when I create a data, input '2017-06-18',that's ok.<br>But when I update data,the sqlalchemy raise:<br>>>>SQLite Date type only accepts Python date objects as input.[SQL: 'UPDATE records SET timestamp=?][parameters: [{'timestamp': (datetime.date(2017, 6, 15),)}]]<br></p>
  
  <p>Where am I wrong? Does datetime.date isn't a Python date object？Why the first time is worked? How can I fix it.<br></p>
  
  <p>My English is poor, if any confused, ask me again.<br></p>
  
  <p>Thanks!</p>