I do not think we changed anything in this respect but you can use
Field('pippo2','datetime',requires=IS_DATETIME(dot=',')),
On Oct 22, 5:32 pm, Marco Prosperi <[email protected]> wrote:
> hi all,
> on my Italian localized Windows PC I have a problem with datetime form
> fields. Putting this code in db.py (you can modify the welcome
> application):
>
> db.define_table('testata',
> Field('campoa','string'),
> Field('descr','string'),
> Field('dt','datetime'))
>
> db.define_table('righe',
> Field('campo1_id',db.testata),
> Field('campo2','string'),)
>
> and this one in index function of default.py:
>
> form=SQLFORM.factory(
> Field('pippo1','string',label='ecco'),
> Field('pippo2','datetime'),
> Field('pippo3','string'))
> if form.accepts(request.vars):
>
> id1=db.testata.insert(campoa=form.vars.pippo1,dt=form.vars.pippo2)
>
> everything works fine with olds versions of web2py but I get a
> validation error with recent ones on datetime field (it looks as if
> web2py expects a date with a English format instead of the Italian one
>
> Marco