Monday, February 16, 2009

jqueryui datepicker as z3cform widget for plone

last time i released collective.z3cform.datepicker i also stripped js code out of jqueryui. this time i packed jqeuryui code and made it availiable to plone as separate package (collective.jqueryui).

you can find source code on github:

miohtama generously helped me with developing and actually pushed me to work on it. current state of code is rc, so expect some minor problems, but soon also stable release will be made.

not all options from datepicker are used and there is a lot of room for improvement. for now there are only 2 kinds of widgets: date and datetime widget. simple example would look like:

from collective.z3cform.datepicker.widget import DatePickerFieldWidget
from collective.z3cform.datepicker.widget import DateTimePickerFieldWidget

class ExampleForm(Form):
""" form """
fields = field.Fields(IExampleSchema)
fields['datetime_field'].widgetFactory[interfaces.INPUT_MODE] = \
fields['date_field'].widgetFactory[interfaces.INPUT_MODE] = \

code was also pushed to (using collective.dist.. tnx tarek for this usefull tool). but i found a little annoying since i need to wait for confirmation before my package is seen to public. is this the purpose how works or i screw something up.

1 comment:

Jon Stahl said...


Thanks, this sounds like a great contribution!

Yes, new products on must be approved before they go live. This prevents spamming and helps us ensure that only Plone-related products are published.