_set_id_attribute(\%params, $name);
my @onchange = $params{onchange} ? (onChange => delete $params{onchange}) : ();
- my @class = $params{no_cal} || $params{readonly} ? () : (class => 'datepicker');
+ my @classes = $params{no_cal} || $params{readonly} ? () : ('datepicker');
+ push @classes, delete($params{class}) if $params{class};
+ my %class = @classes ? (class => join(' ', @classes)) : ();
return $self->input_tag(
$name, blessed($value) ? $value->to_lxoffice : $value,
size => 11,
onblur => "check_right_date_format(this);",
%params,
- @class, @onchange,
+ %class, @onchange,
);
}