X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-input-date-field.html;h=ff4996faf4830020be9a684fe1eb64026526a101;hb=cc04f43d238a1aed658d766577e45d96fcb38d77;hp=2a731e1e8133e558b1bb408a5f0a20f97e77f986;hpb=40a7b3dc653e099f7bd0bd762b649b04c4432db2;p=freeside.git diff --git a/httemplate/elements/tr-input-date-field.html b/httemplate/elements/tr-input-date-field.html index 2a731e1e8..ff4996faf 100644 --- a/httemplate/elements/tr-input-date-field.html +++ b/httemplate/elements/tr-input-date-field.html @@ -21,8 +21,8 @@ }); - <%init> + my($name, $value, $label, $format, $usedatetime); if ( ref($_[0]) ) { my $opt = shift; @@ -35,7 +35,10 @@ if ( ref($_[0]) ) { ($name, $value, $label, $format, $usedatetime) = @_; } -$format = "%m/%d/%Y" unless $format; +my $conf = new FS::Conf; + +$format ||= $conf->config('date_format') || '%m/%d/%Y'; + $label = $name unless $label; if ( $value =~ /\S/ ) {