Skip to main content

A LinesWidget-like for Plone, used for selecting dates

Project description

Introduction

rt.calendarinandout provides an archetype widget that allows to add and remove dates using the fancy jquery.ui.datepicker plugin

Usage

The widget stores the information in to a LinesField archetype field. To use it just add a field like this in your archetype schema:

from Products.Archetypes.atapi import LinesField
from rt.calendarinandout.widget import CalendarInAndOutWidget

LinesField(
    'dates',
    widget = CalendarInAndOutWidget(
        label=u"Dates",
        description=u"Enter the dates in the form yyyy-mm-dd.",
        ),
)

Then you can start enjoyng this widget!

Screenshots

  • The widget when no date is selected

    The widget when no date is selected
  • Data can be entered manually or clicking. If you click the calendar a nice datepicker will popup

    Data can be entered manually or clicking. If you click the calendar a nice datepicker will popup
  • Clicking the plus the date will be added to the selected values, the red cross will remove the date

    Clicking the plus the date will be added to the selected values, the red cross will remove the date

    You can also set the auto_add option for not displaying any “plus” icon, and add the date to the list when a date is selected.

  • Add and remove all the dates you want

    Add and remove all the dates you want
  • With javascript disabled the widget is still fully functional, falling back to a normal textarea where you can insert dates manually

    With javascript disabled the widget is still fully functional
  • In view the dates are rendered as an unordered list

    In view the dates are rendered as an unordered list

Add this egg to your buildout

Direct installation

You can easily include rt.calendarinandout in your buildout by adding it in both in the eggs and zcml sections:

eggs=...
     rt.calendarinandout
     ...

zcml=...
     rt.calendarinandout
     ...

Triggering the installation from your own egg

If you are developing your own egg you can make it depend on rt.calendarinandout by following those three steps:

  • add rt.calendarinandout it in the install_requires section of the setup.py of your egg:

    install_requires=[...
                      'rt.calendarinandout'
                      ...]
  • add the dependency in your egg profiles/default/metadata.xml file:

    <?xml version="1.0"?>
    <metadata>
      <version>...</version>
      <dependencies>
        <dependency>profile-rt.calendarinandout:default</dependency>
      </dependencies>
    </metadata>
  • add the dependency in the configure.zcml at the root of your package, including this line:

    <include package="rt.calendarinandout" />

Credits

Developed with the support of Comune di Modena; Comune di Modena supports the PloneGov initiative.

Comune di Modena's logo

Authors

This product was developed by RedTurtle Technology team.

RedTurtle Technology Site

TODO

  • Complete internazionalization

  • Now duplicate values are forbidden, this should be an option

  • Add an option to trigger the client side validation of the added date format

  • Some artwork will be a nice plus :)

Changelog

1.0.0 (2011-02-07)

  • No more fix the the collective.js.jqueryui version; leave this to buildouts [keul]

  • removed “strip” non-standard method, replaced with a custom “.trim” method [keul]

  • added the “auto_add” option, for automatically add dates to the field when they are selected [keul]

1.0.0-rc3 (2010-11-19)

  • In view dates are rendered in an unordered list

  • Added documentation

1.0.0-rc2 (2010-09-15)

  • Fixed Javascript docstrings [keul]

  • Removed unused locales directory [keul]

  • Removed unused widget parameter “dateformat” [keul]

  • Some relative URL are now absolute, not breaking browser cache [keul]

1.0.0-rc1 (Unreleased)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rt.calendarinandout-1.0.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distributions

rt.calendarinandout-1.0.0-py2.6.egg (16.2 kB view details)

Uploaded Source

rt.calendarinandout-1.0.0-py2.4.egg (16.1 kB view details)

Uploaded Source

File details

Details for the file rt.calendarinandout-1.0.0.tar.gz.

File metadata

File hashes

Hashes for rt.calendarinandout-1.0.0.tar.gz
Algorithm Hash digest
SHA256 43dae1c482f808060ffdb47b8d2b45af665fecd112f921b7a87af0af402d78a6
MD5 afd5ed49c214f413eff247fec70b733f
BLAKE2b-256 9965dbdeecadf5ca0172937bd3438bdd4e3864deb9de790d842d33a184417c57

See more details on using hashes here.

File details

Details for the file rt.calendarinandout-1.0.0-py2.6.egg.

File metadata

File hashes

Hashes for rt.calendarinandout-1.0.0-py2.6.egg
Algorithm Hash digest
SHA256 2b7fd40c9f0e41e67b652798326ccdc2ba249bac8045d89d95bf5a244217fd3c
MD5 8e77b07f658363b1d6b00df7760630ba
BLAKE2b-256 d69518e555b2f338e04ded6841f6624bda88b4b11b4c636cc06ac2f4c0e78468

See more details on using hashes here.

File details

Details for the file rt.calendarinandout-1.0.0-py2.4.egg.

File metadata

File hashes

Hashes for rt.calendarinandout-1.0.0-py2.4.egg
Algorithm Hash digest
SHA256 5b9b6689cbd0666d9c69b465474e8982eb8d46ba2e37b3a47cdf5075b45d5c73
MD5 1cb41fd2f62ae42581bdb108d7044738
BLAKE2b-256 1a3c7998e45ad666a6d24a934102d2480d6fcc7750bccc2761d45af4317b5815

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page