None
@view_config(renderer="templates/form.pt", name="dateparts")
@demonstrate("Date Parts Widget")
def dateparts(self):
import datetime
class Schema(colander.Schema):
date = colander.SchemaNode(
colander.Date(),
widget=deform.widget.DatePartsWidget(),
validator=colander.Range(
min=datetime.date(2010, 1, 1),
min_err=_("${val} is earlier than earliest date ${min}"),
),
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form)