I am definitely missing something.
appadmin and crud.update are ok (they are fine also in my environment).
SQLFORM.factory(db.person) is fine too. I don't get when you say "when I
submit the update".... SQLFORM.factory has no database interactions.
On Friday, October 26, 2012 8:19:45 AM UTC+2, Annet wrote:
>
> In a table person I have the following validator on date of birth:
>
> isdate = dict(type='date',requires=IS_DATE(format='%Y-%m-%d'),represent =
> lambda v: v.strftime('%d/%m/%Y') if v else '')
>
> In appadmin and in form.crud.update(table=db.person, record=row) the date
> is represented correctly, however, in SQLFORM.factory(db.person) it is not.
> Instead of 21-09-1976 it is displayed the way it is formatted 1976-09-21,
> and when I submit the update form I get an error on the DoB field, because
> of the date is incorrect. I have to re-enter the DoB 21-09-1976 to be able
> to submit the form.
>
> Is this intended behaviour, or isn't it? I am working with web2py version
> 2.0.9.
>
>
> Kind regards,
>
> Annet
>
--