I have used an sql form for adding records with date fields. After some 
changes the error " Enter date as 1963-08-28"  pops up when entering a date.

In db.py
db.define_table('local_ev_def',
                ...
                Field('ev_start_date', 'date', required=True,
                                  label=T('EV start date')),
                Field('ev_end_date', 'date',  required=True,
                                  label=T('EV end date')),
                .....

In Controller
    db.local_ev_def.global_ev.requires = 
IS_IN_DB(db(db.global_ev.community==com), 'global_ev.id', '%(gev_name)s')
    form_add_local_ev_def = SQLFORM(db.local_ev_def,
                                fields=['lev_def_name', 'description', 
'homeostat', 'global_ev', 'period',
                                        'ev_start_date', 'ev_start_date', 
'data_type', 'unit'])
    form_add_local_ev_def.vars.community=com
    if form_add_local_ev_def.process(formname='add_lev_def').accepted:
        new_lev_def = db.local_ev_def[form_add_local_ev_def.vars.id]
        new_lev_def.update_record(recursion=db.recursion[target_rec.id].id,
                                  created_by=auth.user_id,
                                  )

What may cause this error?

Richard D

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to