first of all: do you input the date with that format ?
Date format is dependant on the representation of the date itself, that is 
managed by the T operator.
If you scan your (supposedly) it.py and it-it.py you'll see that there's a 
translation for the string %Y-%m-%d that is the one used to "translate" the 
date format....

On Wednesday, June 19, 2013 3:34:52 PM UTC+2, palomar wrote:
>
> 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