Date Field Plugin
Provides support for a new type,
date
, in form fields. When a form field is set to this type it will no longer be editable by normal means, but only through a date selection popup.
Usage
In a form definition, enter
date
where you would normally put
text
. For example:
| Birthday | date | 0 | 1 April 2004 | A date |
This will display an
uneditable text field and a date selection icon that can be clicked to use the Mishoo Javascript calendar widget to insert a date. The
size
field is ignored.
If you want to use Javascript to create other data types in form fields, you can use this plugin as a model of how to do it.
Settings
- Description:
- Set SHORTDESCRIPTION = Adds a
date
type to forms
- Setup for Mishoo JSCalendar
- The following styles are available: system blue blue2 brown green tas win2k-1 win2k-2 win2k-cold-1 win2k-cold-2
- The following languages are available: af es ko-utf8 ru br fi lt si ca fr lt-utf8 sk cs-win hr nl sp da hr-utf8 no sv de hu pl tr du it pl-utf8 zh el jp pt en ko ro
Plugin Installation Instructions
- Download the ZIP file from the Plugin web (see below)
- Unzip
DateFieldPlugin.zip
in your twiki installation directory. Content:
File: | Description: |
data/TWiki/DateFieldPlugin.txt | Plugin topic |
lib/TWiki/Plugins/DateFieldPlugin.pm | Plugin Perl module |
lib/TWiki/Plugins/DateFieldPlugin/build.pl | Build file |
DateFieldPlugin_installer.pl | Install script |
- Optionally, run
DateFieldPlugin_installer
to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
- Alternatively, manually make sure the dependencies listed in the table below are resolved.
Name | Version | Description |
---|
TWiki::Contrib::JSCalendarContrib | >=0.96 | Used to display a neat calendar popup. Available from the TWiki:Plugins/JSCalendarContrib repository. |
- Edit your
edit
template (in the templates directory). The actual file name to edit will depend on the skin you are using, but will usually be edit.pattern.tmpl
or edit.tmpl
or similar. Add the following line to the HEADER block:
<!-- INCLUDEJSCALENDAR -->
If you are using pattern skin (
edit.pattern.tmpl
), it should be added just after the line reading:
%TMPL:DEF{"script"}%
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins, TWiki::Plugins/FormFieldsPlugin
--
TWiki:Main/CrawfordCurrie - 17:29:44 06 December 2004