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

-- 



Reply via email to