Trim out hours from date picker export (ref #7185)
This commit is contained in:
parent
cecc59eba6
commit
4da99d6d83
|
@ -25,6 +25,9 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -348,9 +351,10 @@ public class WordBuilder {
|
|||
CheckBoxData data = (CheckBoxData) field.getData();
|
||||
if (field.getValue() == null || field.getValue().equals("false")) return null;
|
||||
return data.getLabel();
|
||||
case "freetext":
|
||||
case "datepicker":
|
||||
case "datePicker":
|
||||
return field.getValue() != null ? DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()).format(Instant.parse((String)field.getValue())) : "";
|
||||
case "freetext":
|
||||
case "textarea":
|
||||
case "richTextarea":
|
||||
return field.getValue() != null ? field.getValue().toString(): "";
|
||||
|
|
Loading…
Reference in New Issue