> Changing your widget to the following will change the way the time
> appears in forms:
Apologies, my formatting of the code made it unreadable. Reposting the
modified widget that formats the time without seconds:
def timeplain(field,value):
if value == None:
value = ''
elif 'strftime' in dir(value):
value = value.strftime('%H:%M')
id = '%s_%s' % (field._tablename, field.name)
return INPUT(
_type='text',
_id=id,
_class='time_plain',
_name=field.name,
value=str(value),
requires=field.requires,
)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---