In AppEngine, I have a form that prompts a user for a date. The problem is that when the clicks enter there is an error: "Enter a Valid Date"
How do I make my Form accept (for example) %d-%b-%Y
as the date format?
Is there a more elegant way to accomplish this?
# Model and Forms
class Task(db.Model):
name=db.StringProperty()
due=db.DateProperty()
class TaskForm(djangoforms.ModelForm):
class Meta:
model = Task
# my get function has the following.
# using "now" for example. Could just as well be next Friday.
tmStart = datetime.now()
form = TaskForm(initial={'due': tmStart.strftime("%d-%b-%Y")})
template_values = {'form': form }