You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/07/26 08:44:56 UTC

[isis] branch master updated: ISIS-3085: change icon for time-picker close: use 'check' icon

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new e9d5e02938 ISIS-3085: change icon for time-picker close: use 'check' icon
e9d5e02938 is described below

commit e9d5e0293812f308364e37df6298e95d44888893
Author: andi-huber <ah...@apache.org>
AuthorDate: Tue Jul 26 10:44:49 2022 +0200

    ISIS-3085: change icon for time-picker close: use 'check' icon
    
    rather than 'close' icon
---
 .../scalars/datepicker/TextFieldWithDateTimePicker.java     | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
index 9c3ec070d1..fe40ea4c78 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/datepicker/TextFieldWithDateTimePicker.java
@@ -71,11 +71,13 @@ implements IConverter<T> {
         super(id, scalarModel.unwrapped(type), type);
         setOutputMarkupId(true);
 
-        this.converter = converter;
         this.config = createDatePickerConfig(
                 scalarModel.getCommonContext(),
+                ((ConverterBasedOnValueSemantics<T>) converter).getEditingPattern(),
                 !scalarModel.isRequired());
 
+        this.converter = converter;
+
         /* debug
                 new IConverter<T>() {
 
@@ -171,6 +173,7 @@ implements IConverter<T> {
 
     private DateTimeConfig createDatePickerConfig(
             final IsisAppCommonContext commonContext,
+            final String temporalPattern,
             final boolean isInputNullable) {
         val config = new DateTimeConfig();
 
@@ -178,11 +181,7 @@ implements IConverter<T> {
                 .map(UserLocale::getLanguageLocale)
                 .orElse(Locale.US));
 
-        // if this text field is for a LocalDate, then the pattern obtained will just be a simple date format
-        // (with no hour/minute components).
-        final String dateTimePattern = ((ConverterBasedOnValueSemantics<T>)converter).getEditingPattern();
-        config.withFormat(_TimeFormatUtil.convertToMomentJsFormat(dateTimePattern));
-
+        config.withFormat(_TimeFormatUtil.convertToMomentJsFormat(temporalPattern));
         config.useCalendarWeeks(true);
         config.useCurrent(false);
 
@@ -214,7 +213,7 @@ implements IConverter<T> {
                 .useNextIcon(FontAwesome6IconType.chevron_right_s)
                 .useTodayIcon(FontAwesome6IconType.calendar_check_r)
                 .useClearIcon(FontAwesome6IconType.trash_can_r)
-                .useCloseIcon(FontAwesome6IconType.xmark_s)
+                .useCloseIcon(FontAwesome6IconType.check_s)
                 );
 
         //XXX future extensions might allow to set bounds on a per member basis (via ValueSemantics annotation)