• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

I patched my local copy to show the current date as default in the input box, dunno if people find this useful. If so, I could patch the distriburion version over here too. The change is quite simple, and for general use should probably be conditional on the value in the form (eg, '$current' or something). Here is the line I added:

sub renderFormFieldForEditHandler {
    my ( $name, $type, $size, $value, $attributes, $possibleValues ) = @_;
    my $calendarOutputFormat = TWiki::Func::getPreferencesValue('DATEFIELDPLUGIN_DATEFORMAT') || '%d %b %Y';
     return unless $type eq "date";

+    $value=strftime($calendarOutputFormat,localtime(time));

     my $content =
       CGI::image_button(

-- KoenMartens - 23 Jun 2006

ItemTemplate
Summary Default value to current date
ReportedBy TWiki:Main.KoenMartens
Codebase ~twiki4
SVN Range TWiki-4.1-beta1, Mon, 24 Jul 2006, build 11161
AppliesTo Extension
Component DateFieldPlugin
Priority Enhancement
CurrentState Closed
WaitingFor

Checkins 11355 11356 11391
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2006-10-31 - RickMach
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback