You are here: Home / LBN / Up2date / Plone and Zope / BastionLinux 19 / ftw.datepicker-1.1.2-1.lbn19.noarch

ftw.datepicker-1.1.2-1.lbn19.noarch

Package Attributes
RPM  ftw.datepicker-1.1.2-1.lbn19.noarch.rpm Architecture  noarch Size  304640 Created  2019/09/30 06:55:27 UTC
Package Specification
Summary A z3c.form datepicker widget (Maintainer Thomas Buchberger)
Group Application/Internet
License ZPL
Home Page https://pypi.python.org/packages/source/f/ftw.datepicker/ftw.datepicker-1.1.2.tar.gz
Description

ftw.datepicker provides a date/time picker widget for your z3c.form fields using the jQuery based DateTimePicker widget from XDSoft (http://xdsoft.net/jqplugins/datetimepicker/).

Usage

You can apply the widget to your field with the help of plone.directives.form:

from plone.directives import form from plone.supermodel import model from ftw.datepicker.widget import DateTimePickerWidgetFactory

class MySchema(model.Schema): form.widget(due_date=DateTimePickerWidgetFactory) due_date = schema.Datetime()

This renders a widget which allows to select the date and time.

You can pass a custom configuration of the widget like this:

from plone.directives import form from plone.supermodel import model from ftw.datepicker.widget import DateTimePickerWidgetFactory

class MySchema(model.Schema): form.widget(due_date, DateTimePickerWidgetFactory, config=my_config) due_date = schema.Datetime()

config can either be a dict or a callable which produces a dict. The value is then converted to a JSON object and passed to the template for the widget to be picked up. Example: {‘format’: ‘d.m.Y’, ‘timepicker’: False}.

See http://xdsoft.net/jqplugins/datetimepicker/ for a full list of options.

You could apply the widget even to a TextLine field if you need to.

Requires
rpmlib(FileDigests)  
/bin/sh  
rpmlib(CompressedFileNames)  
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PartialHardlinkSets)  
rpmlib(PayloadIsXz)  
Provides
ftw.datepicker

Document Actions