Is it possible to do it on a field not associated to any db ?

say that for example I have one input with the format "YYYY/mm/dd" an
another input field in another page with the format "25th Jun, 1990"...

is it possible to do that using the date picker provided  by web2py ?



On Mon, Apr 20, 2009 at 10:18 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:

>
> My fault..."formatter" not "format"
>
> {{=db.event.van_datum.formatter(event.van_datum)}}
>
> On 20 Apr, 07:51, jmverm...@xs4all.nl wrote:
> > Massimo,
> >
> > I am a bit closer to getting my event list to display the dates
> > properly.
> >
> > The following error was solved replacing fromdate=request.vars.datum
> > with fromdate=form.vars.datum
> >
> > fromdate=request.vars.datum
> > todate=form.vars.datum+datetime.timedelta(days=int(form.vars.dagen))
> >
> > Exposing the function now results in the following error ticket:
> > File "/Library/Python/2.5/site-packages/web2pyfitwise/gluon/sql.py",
> > line 664, in <lambda> **b)
> > DataError: date/time field value out of range: "22-04-2009"
> > HINT:  Perhaps you need a different "datestyle" setting.
> >
> > This got me to the view, where the following line of code is causing
> > an error:
> >
> > {{=db.event.van_datum.format(event.van_datum)}}
> >
> > Traceback (most recent call last):
> >   File "/Library/Python/2.5/site-packages/web2pyfitwise/gluon/
> > restricted.py", line 98, in restricted
> >     exec ccode in environment
> >   File "/Library/Python/2.5/site-packages/web2pyfitwise/applications/
> > core/views/eventlist/byplace.html", line 99, in <module>
> > AttributeError: 'SQLField' object has no attribute 'format'
> >
> > {{=event.van_datum}} displays the date formatted YYYY-mm-dd whereas I
> > need dd-mm-YYYY
> >
> > I hope this is the last hurdle to overcome.
> >
> > Annet.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to