A LinesWidget-like for Plone, used for selecting dates
Provides an Archetypes widget that allows to add and remove dates using the fancy jquery.ui.datepicker plugin
Table of contents
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!
You can use following additional widget options:
- Instead of showing an “add date” button/icon, automatically add the date when selected on the calendar. Default is true.
- Allow the selection of the same date more and more times. Default is false.
The widget when no date is selected
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
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
In view the dates are rendered as an unordered list
You can easily include rt.calendarinandout in your buildout by adding it in both in the eggs and zcml sections:
eggs=... rt.calendarinandout ...
After then, re-run your buildout, restart your instance and activate the rt.calendarinandout add-on.
- Complete internazionalization
- Add an option to trigger the client side validation of the added date format
- Gives to developer a way to control date format used
- Some artwork will be a nice plus :)
Developed with the support of:
All of them supports the PloneGov initiative.
Plone 4.3 supported while dropped Plone 3
- Activate jQueryUI datepicker when installed [keul]
- Include icons in the product itself for Plone 4.3 compatibility [keul]
- All images loaded from site root, to be cache friendly [keul]
- Changed default value of auto_add to true [keul]
- HTML sanitize: removed duplicated id that origin validation errors [keul]
- Accessibility fixes: the widget can now be used with keyboard [keul]
- removed any deprecated reference to jq [keul]
- do not pollute global namespace anymore [keul]
- fixed disabled option allow_duplicate [keul]
- when auto_add option is used, automatically clear the new date field [keul]
- code cleanup
- Egg changes as we moved to github [keul]
- Enabled adding a date also with “enter” key [cekk]
- Fix problem with widget activation on IE [lucabel]
- fix the problem with duplicate widgets in one schema [amleczko]
- 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]
- In view dates are rendered in an unordered list
- Added documentation
- Removed unused locales directory [keul]
- Removed unused widget parameter “dateformat” [keul]
- Some relative URL are now absolute, not breaking browser cache [keul]
- Initial release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash||File type||Python version||Upload date|
|rt.calendarinandout-1.2.0.zip (29.2 kB) View hashes||Source||None|