From b9894fd0019b4926e3f590c9905d528b0a47dd3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 12 Oct 2011 14:33:59 +0200 Subject: [PATCH] L.date_tag kann jetzt auch mit DateTime objekten umgehen --- SL/Template/Plugin/L.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 476b60a70..bf0d5414e 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -4,6 +4,7 @@ use base qw( Template::Plugin ); use Template::Plugin; use List::MoreUtils qw(apply); use List::Util qw(max); +use Scalar::Util qw(blessed); use strict; @@ -273,7 +274,9 @@ sub date_tag { $params{cal_align} ||= 'BR'; - $self->input_tag($name, $value, + my $str_value = blessed $value ? $value->to_lxoffice : $value; + + $self->input_tag($name, $str_value, id => $name_e, size => 11, title => _H($::myconfig{dateformat}), -- 2.20.1