I have a form that I submit by ajax and I have a problem with a date field.

in my db: 
db.define_table('fatture',
    Field('codice','string', length=10),
    Field('dataf', 'date'))

in my form:
<input id="dataf" name="dataf" type="date">
<input id="codice" name="codice" type="text">

ajax function:
ajax('inseriscifa',['codice','dataf'],':eval') 

controller:
def inseriscifa():      
    form = SQLFORM(db.fatture)
    if form.accepts(request.vars, formname=None):        
        return "alert('ok')"                            
    elif form.errors:
        return "alert('" + XML(TABLE(*[TR(k, v) for k, v in 
form.errors.items()])) + "')"

And, I don't understand why, I got an error about date format:
*enter date as 28/08/1963*

what's wrong? validors are great in web2py, but whit date a I have always 
problem...
s.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to