On Aug 10, 2009, at 6:04 PM, FERNANDO VILLARROEL wrote: > > Thank you Jonathan, now works fine.
Good, I'm glad to hear it. Notice that, independent of the calendar widget, HTML itself requires that all IDs on a page be unique. Lots of stuff will work OK if you violate the rule, but it's good practice to observe it. Use classes when multiple items need to be the same. > > --- On Mon, 8/10/09, Jonathan Lundell <[email protected]> wrote: > >> From: Jonathan Lundell <[email protected]> >> Subject: [web2py:28322] Re: Calendar >> To: [email protected] >> Date: Monday, August 10, 2009, 8:56 PM >> >> On Aug 10, 2009, at 4:48 PM, FERNANDO VILLARROEL wrote: >> >>> >>> Dear all, >>> >>> I am trying use calendar on a simple form as below: >>> >>> def llamados(): >>> >>> >>> hoy=time.time() >>> desde=time.strftime('%d-%m-%Y >> 00:00:00',time.localtime(desde)) >>> hasta=time.strftime('%d-%m-%Y >> %H:%M:%S',time.localtime(hoy)) >>> >>> >>> lineas >>> = >>> db >>> (db >>> .accountcode >>> .id_clientes >>> = >>> = >>> session >>> >> .cliente_id).select(db.accountcode.ani,orderby=db.accountcode.ani) >>> >>> if len(lineas) > 1: >>> >>> >> acc=['All'] >>> >>> else: >>> >>> >> acc=[] >>> >>> for l in lineas: >>> >>> >> acc.append(l.ani) >>> >>> >>> form >>> = >>> FORM >>> (TABLE >>> (TR >>> ("Desde >>> :",INPUT >>> (_type >>> = >>> "datetime >>> >> ",_name="desde",_value=desde,_class='datetime',_id="datetlimite", >> >>> requires=IS_DATETIME())), >>> >> >>> TR >>> ("Hasta >>> :",INPUT >>> (_type >>> = >>> "datetime >>> >> ",_name="hasta",_value=hasta,_class='datetime',_id="datetlimite", >> >>> requires=IS_DATETIME())), >>> >> >>> >> TR("Lineas",SELECT(acc,_name="linea",requires=IS_IN_SET(acc))), >>> >> >> TR("",INPUT(_type="submit",_value="Consultar")))) >>> >>> return dict(form=form) >>> >>> >>> I can see calendar only in the first INPUT >> (_name="desde"). >>> >>> Why when i trying of update date the second INPUT >> (_name="hasta") >>> the calendar not show? >> >> Try giving your INPUTs distinct ID's. >> >>> >>> Fernando. >>> >>> >>> >>> >>>> >> >> >> >>> >> > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

