I have a date data type in one of my class and it is optional, so I set null=True. but when the user input nothing for the date and submit the info, I get the error message of
[u"'' value has an invalid date format. It must be in YYYY-MM-DD format."]
Field :birthday=models.DateField(null=True)
HTML code is as below.
<div>
<label>Birthday:</label>
<input type="date" id="id_bd" name="bd">
</div>
Can anyone explain to me why this would happen and how am I going to handle this null input error? Thank you very much.