Now I know the problem and the solution....

Let's go:

In db.py I put this:
    Field('data_hora','datetime', default=now,
requires=[IS_DATETIME(format='%d-%m-%Y %H:%M'), IS_NOT_IN_DB(db,
'agenda.data_hora')], unique=True, label=T('Data/Hora')),
and in web2py_ajax.html I customize the default datetime format:
    try { jQuery("input.datetime").focus( function() {Calendar.setup({
        inputField:this.id, ifFormat:"{{=T('%d-%m-%Y %H:%M')}}",
showsTime: true,timeFormat: "24"

Now run OK.

Thanks friends.

-- Leandro.





Reply via email to