> One way of disabling the time picker is to remove the line
> try { $("input.time").clockpick({ starthour:0, endhour:23,
> showminutes:true, military:true}); } catch(e) {};
> from web2py_ajax.html in 'views'. Another way would be do use jquery
> to remove the clockpick class from the input field on document load.
> But there is probably an even better way that someone else might tell
> us...
I was wrong about the 'clockpick' class - that's the name of the
javascript function that makes the time selector.
I think the right way to not have the time selector is to use a
widget. See http://www.web2py.com/AlterEgo/default/show/170 .
I haven't tested the following thoroughly but it seems to work:
Putting
def timeplain(field,value):
if value == None:
value = ''
id = '%s_%s' % (field._tablename, field.name)
return INPUT(
_type='text',
_id=id,
_class='time_plain', #### this is the line I changed
_name=field.name,
value=str(value),
requires=field.requires,
)
before the field definition in the model file, then changing the field
definition to
db.Field('time', 'time', widget=timeplain))
Chris
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---