Hi, I'm using the datepicker in combination with an SQLFORM. Since the date is not used in any case I'm enhancing the SQLFORM named form as follows but exactly the way you want to do: valid_thru = TR(TD(LABEL(T('Valid thru')), TD(INPUT(_name='valid_thru', _type='date', _value=datetime.now().strftime('%Y-%m-%d'))))) form[0].insert(-1, valid_thru)
And it works, with a preset value of today. Hope it helps! Best regards Clemens On Monday, August 3, 2020 at 2:48:34 AM UTC+2, Vlad wrote: > > Ok so I have this *non-SQLFORM* form > > form = FORM(TABLE(TR(XML('Please enter/select below '),XML(' ')), > TR(XML('Created'),INPUT(_name='skillcreated', > _value=skillsdict['created']), _type="text", ), > TR(XML(' '),XML(' ')), > TR(INPUT(_type='submit',_value="SUBMIT"),XML(' ')))) > > > I have tried using > > type="date" > _type="date" > requires = IS_DATE(format=T('%Y-%m-%d'), > > > but in neither case I can get the calendar picker automatically added for > the field. > > Tried to search doc, examples, even the code in an auto-generated web2py > form, to no avail. > > All help will be appreciated > > > > -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/a00c2688-56f5-49fe-8fd8-ddb48172f440o%40googlegroups.com.