None
@view_config(renderer="templates/form.pt", name="datetimeinput_readonly")
@demonstrate("DateTime Input Widget (read-only)")
def datetimeinput_readonly(self):
import datetime
then = datetime.datetime(2011, 5, 5, 1, 2)
class Schema(colander.Schema):
date_time = colander.SchemaNode(
colander.DateTime(),
widget=deform.widget.DateTimeInputWidget(readonly=True),
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form, appstruct={"date_time": then})