horae.datetime 1.0a1
zope.formlib datetime widget used by Horae
Introduction
horae.datetime provides zope.formlib input widgets for Date and Datetime fields of zope.schema. Both widgets use the datepicker widget of jQuery UI to select the date. The Datetime widget additionally provides two input fields to enter the hour and minute for the time. The hour and minute fields are enhanced by the Spinbox jQuery plugin.
Usage
The widgets may either be registered through ZCML as new default input widgets for Date and Datetime fields or by defining the widget as custom_widget on a zope.formlib form. Registration as default widget has to be done either in an overrides.zcml or the registrations have to be bound to a specific browser layer.
Registration using the overrides.zcml would look like this:
<configure xmlns='http://namespaces.zope.org/zope'>
<view
type="zope.publisher.interfaces.browser.IBrowserRequest"
for="zope.schema.interfaces.IDatetime"
provides="zope.app.form.interfaces.IInputWidget"
factory="horae.datetime.widget.DatetimeWidget"
permission="zope.Public"
/>
<view
type="zope.publisher.interfaces.browser.IBrowserRequest"
for="zope.schema.interfaces.IDate"
provides="zope.app.form.interfaces.IInputWidget"
factory="horae.datetime.widget.DateWidget"
permission="zope.Public"
/>
</configure>
Dependencies
Changelog
1.0a1 (2012-01-16)
- Initial release
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| horae.datetime-1.0a1.tar.gz (md5) | Source | 2012-01-16 | 10KB | 176 | |
- Author: Simon Kaeser
- License: GPL
- Categories
- Package Index Owner: raptus
- DOAP record: horae.datetime-1.0a1.xml
