JS Calendar Contrib
DEPRECATED pop-up calendar with date picker -- please upgrade to new
DatePickerPlugin
This
Mishoo JSCalendar based DHTML pop-up calendar is now repackaged as
DatePickerPlugin. Simply installing the
TWiki:Plugins.DatePickerPlugin is not enough:
- Extensions that have a dependency on JSCalendarContrib need to be updated to version 2012-12-12 or later:
- TWiki pages that use JSCalendarContrib need to be updated (see below).
- Once plugins and page content have been updated it is safe to remove this JSCalendarContrib completely.
Please update your content to use the
%DATEPICKER{}% variable instead of handcrafted HTML to show a popup calendar.
The old JSCalendarContrib way:
%INCLUDE{"%SYSTEMWEB%.JSCalendarContribInline"}%
<input type="text" name="start_date" id="cal_val_here" />
<input type="image"
src="%PUBURL%/%SYSTEMWEB%/JSCalendarContrib/img.gif"
onclick="javascript:
return showCalendar('cal_val_here','%Y-%m-%d')" />
| | | |
Change to the new DatePickerPlugin way:
%DATEPICKER{ name="start_date" }%
|
Please update your plugins to use the new
DatePickerPlugin. Example:
The old JSCalendarContrib way:
use TWiki::Contrib::JSCalendarContrib;
...
my $fromDate =
TWiki::Contrib::JSCalendarContrib::renderDateForEdit(
'from', '1 April 1999');
my $toDate =
TWiki::Contrib::JSCalendarContrib::renderDateForEdit(
'to', undef, '%Y');
| | | |
Change to the new DatePickerPlugin way:
use TWiki::Plugins::DatePickerPlugin;
...
my $fromDate =
TWiki::Plugins::DatePickerPlugin::renderForEdit(
'from', '1 April 1999');
my $toDate =
TWiki::Plugins::DatePickerPlugin::renderForEdit(
'to', undef, '%Y');
|
Example using hand-crafted Javascript:
The old JSCalendarContrib way:
use TWiki::Contrib::JSCalendarContrib;
...
sub commonTagsHandler {
....
TWiki::Contrib::JSCalendarContrib::addHEAD( 'twiki' );
my $cal = CGI::image_button(
-name => 'img_datefield',
-onclick =>
"return showCalendar('id_datefield','%Y %b %e')",
-src=> TWiki::Func::getPubUrlPath() . '/' .
TWiki::Func::getTwikiWebname() .
'/JSCalendarContrib/img.gif',
-alt => 'Calendar',
-align => 'middle' )
. CGI::textfield(
{ name => 'date', id => "id_datefield" });
....
}
| | | |
Change to the new DatePickerPlugin way:
use TWiki::Plugins::DatePickerPlugin;
...
sub commonTagsHandler {
....
TWiki::Plugins::DatePickerPlugin::addToHEAD( 'twiki' );
my $cal = CGI::image_button(
-name => 'img_datefield',
-onclick =>
"return showCalendar('id_datefield','%Y %b %e')",
-src=> TWiki::Func::getPubUrlPath() . '/' .
TWiki::Func::getTwikiWebname() .
'/DatePickerPlugin/img.gif',
-alt => 'Calendar',
-align => 'middle' )
. CGI::textfield(
{ name => 'date', id => "id_datefield" });
....
}
|
- Set SHORTDESCRIPTION = DEPRECATED pop-up calendar with date picker -- please upgrade to new DatePickerPlugin
Related Topics: DatePickerPlugin,
VarDATEPICKER,
JSCalendarContribInline,
TWikiPreferences,
TWikiForms