You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2016/03/15 16:31:34 UTC

syncope git commit: [SYNCOPE-730] Replaced the Bootstrap DateTimePicker with the YUI DateTimePicker

Repository: syncope
Updated Branches:
  refs/heads/master 355ffbb9c -> 8cee98bc2


[SYNCOPE-730] Replaced the Bootstrap DateTimePicker with the YUI DateTimePicker


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8cee98bc
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8cee98bc
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8cee98bc

Branch: refs/heads/master
Commit: 8cee98bc2e6c548558ae71723a714222f0511a31
Parents: 355ffbb
Author: Marco Di Sabatino Di Diodoro <md...@apache.org>
Authored: Tue Mar 15 16:31:16 2016 +0100
Committer: Marco Di Sabatino Di Diodoro <md...@apache.org>
Committed: Tue Mar 15 16:31:16 2016 +0100

----------------------------------------------------------------------
 .../panels/ParametersCreateWizardAttrStep.java  |  17 +-
 .../console/panels/ParametersDetailsPanel.java  |  15 +-
 .../console/tasks/StartAtTogglePanel.java       |   7 +-
 .../markup/html/form/AjaxDateFieldPanel.java    | 209 -------------------
 .../wicket/markup/html/form/DateFieldPanel.java | 132 ++++++++++++
 .../markup/html/form/DateTextFieldPanel.java    | 112 ++++++++++
 .../markup/html/form/DateTimeFieldPanel.java    | 187 +++++++++++++++++
 .../markup/html/form/DateTimePickerField.java   |  89 ++++++++
 .../client/console/wizards/any/PlainAttrs.java  |  20 +-
 .../resources/META-INF/resources/css/search.css |   4 +
 .../META-INF/resources/css/syncopeConsole.css   |  93 +++++++++
 .../panels/search/AbstractSearchPanel.html      |   3 -
 .../markup/html/form/AjaxDateFieldPanel.html    |  34 ---
 .../markup/html/form/DateTextFieldPanel.html    |  33 +++
 .../markup/html/form/DateTimeFieldPanel.html    |  36 ++++
 .../html/form/DateTimeFieldPanel.properties     |  17 ++
 .../html/form/DateTimeFieldPanel_it.properties  |  17 ++
 .../form/DateTimeFieldPanel_pt_BR.properties    |  17 ++
 .../markup/html/form/DateTimePickerField.html   |  41 ++++
 19 files changed, 825 insertions(+), 258 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java
index c3795a1..3f38b5f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java
@@ -22,12 +22,14 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import org.apache.syncope.client.console.commons.SchemaUtils;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDateFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxSpinnerFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.wicket.extensions.wizard.WizardStep;
@@ -91,8 +93,17 @@ public class ParametersCreateWizardAttrStep extends WizardStep {
         final FieldPanel panel;
         switch (plainSchemaTO.getType()) {
             case Date:
-                panel = new AjaxDateFieldPanel(
-                        id, valueHeaderName, new Model<Date>(), plainSchemaTO.getConversionPattern());
+                final String dataPattern = plainSchemaTO.getConversionPattern() == null
+                        ? SyncopeConstants.DEFAULT_DATE_PATTERN
+                        : plainSchemaTO.getConversionPattern();
+
+                if (dataPattern.contains("H")) {
+                    panel = new DateTimeFieldPanel(
+                            id, valueHeaderName, new Model<Date>(), dataPattern);
+                } else {
+                    panel = new DateTextFieldPanel(
+                            "panel", valueHeaderName, new Model<Date>(), dataPattern);
+                }
                 break;
             case Boolean:
                 panel = new AjaxDropDownChoicePanel<>(id, valueHeaderName, new Model<String>(), false);

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java
index ff56848..972c3f7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java
@@ -23,12 +23,14 @@ import java.util.Date;
 import java.util.List;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import org.apache.syncope.client.console.commons.SchemaUtils;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDateFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxSpinnerFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
+import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.syncope.common.lib.types.SchemaType;
@@ -78,8 +80,15 @@ public class ParametersDetailsPanel extends Panel {
         final FieldPanel panel;
         switch (schemaTO.getType()) {
             case Date:
-                panel = new AjaxDateFieldPanel(
-                        id, valueHeaderName, new Model<Date>(), schemaTO.getConversionPattern());
+                final String dataPattern = schemaTO.getConversionPattern() == null
+                        ? SyncopeConstants.DEFAULT_DATE_PATTERN
+                        : schemaTO.getConversionPattern();
+
+                if (dataPattern.contains("H")) {
+                    panel = new DateTimeFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+                } else {
+                    panel = new DateTextFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+                }
                 break;
             case Boolean:
                 panel = new AjaxDropDownChoicePanel<>(id, valueHeaderName, new Model<String>(), false);

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/tasks/StartAtTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/StartAtTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/StartAtTogglePanel.java
index 7219c4c..341e4cd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/StartAtTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/StartAtTogglePanel.java
@@ -26,7 +26,7 @@ import org.apache.syncope.client.console.commons.Constants;
 import org.apache.syncope.client.console.panels.TogglePanel;
 import org.apache.syncope.client.console.rest.TaskRestClient;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDateFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
 import org.apache.syncope.common.lib.SyncopeClientException;
 import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.to.SchedTaskTO;
@@ -51,8 +51,9 @@ public class StartAtTogglePanel extends TogglePanel<Serializable> {
 
         final Model<Date> startAtDateModel = new Model<>();
 
-        final AjaxDateFieldPanel startAtDate = new AjaxDateFieldPanel(
-                "startAtDate", "startAtDate", startAtDateModel, SyncopeConstants.DATE_PATTERNS[3]);
+        final DateTimeFieldPanel startAtDate =
+                new DateTimeFieldPanel(
+                        "startAtDate", "startAtDate", startAtDateModel, SyncopeConstants.DATE_PATTERNS[3]);
 
         startAtDate.setReadOnly(true).hideLabel();
         form.add(startAtDate);

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java
deleted file mode 100644
index 0cb5118..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.wicket.markup.html.form;
-
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.DateTextField;
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.DateTextFieldConfig;
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.datetime.DatetimePicker;
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.datetime.DatetimePickerConfig;
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.datetime.DatetimePickerIconConfig;
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesomeIconType;
-import java.io.Serializable;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-import org.apache.commons.lang3.time.FastDateFormat;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.common.lib.SyncopeConstants;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converter.DateConverter;
-
-public class AjaxDateFieldPanel extends FieldPanel<Date> {
-
-    private static final long serialVersionUID = -428975732068281726L;
-
-    private final String datePattern;
-
-    public AjaxDateFieldPanel(final String id, final String name, final IModel<Date> model, final String pattern) {
-        super(id, name, model);
-
-        this.datePattern = pattern == null ? SyncopeConstants.DEFAULT_DATE_PATTERN : pattern;
-
-        if (this.datePattern.contains("H")) {
-            field = new DatetimePicker("date", model, new DatetimePickerConfig().
-                    withFormat(this.datePattern.replaceAll("'", "")).
-                    setShowToday(true).
-                    useSideBySide(true).
-                    with(new DatetimePickerIconConfig()
-                            .useDateIcon(FontAwesomeIconType.calendar)
-                            .useTimeIcon(FontAwesomeIconType.clock_o)
-                            .useUpIcon(FontAwesomeIconType.arrow_up)
-                            .useDownIcon(FontAwesomeIconType.arrow_down)
-                    )) {
-
-                private static final long serialVersionUID = -6308790460702853262L;
-
-                // T0DO: trying to fix SYNCOPE-730
-                // Check if SimpleDateFormat can be replaced by FastDateFormat (see usage below)
-                @Override
-                @SuppressWarnings("unchecked")
-                public <C> IConverter<C> getConverter(final Class<C> type) {
-                    return (IConverter<C>) new DateConverter() {
-
-                        private static final long serialVersionUID = 8025900377461981157L;
-
-                        @Override
-                        public DateFormat getDateFormat(final Locale locale) {
-                            return new SimpleDateFormat(
-                                    datePattern,
-                                    locale == null ? SyncopeConsoleSession.get().getLocale() : locale);
-                        }
-                    };
-                }
-            };
-        } else {
-            field = new DateTextField("date", model, new DateTextFieldConfig()
-                    .withFormat(this.datePattern)
-                    .highlightToday(true)
-                    .autoClose(true)
-                    .showTodayButton(DateTextFieldConfig.TodayButton.TRUE));
-        }
-
-        add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true));
-        add(field);
-    }
-
-    // todo: Evaluate the actual needs to keep this override.
-    @Override
-    public FieldPanel<Date> setNewModel(final List<Serializable> list) {
-        final SimpleDateFormat formatter = datePattern == null
-                ? new SimpleDateFormat(SyncopeConstants.DEFAULT_DATE_PATTERN, Locale.getDefault())
-                : new SimpleDateFormat(datePattern, Locale.getDefault());
-
-        IModel<Date> model = new Model<Date>() {
-
-            private static final long serialVersionUID = 6799404673615637845L;
-
-            @Override
-            public Date getObject() {
-                Date date = null;
-                final Object obj = list == null || list.isEmpty() ? null : list.get(0);
-
-                if (obj != null && !obj.toString().isEmpty()) {
-                    if (obj instanceof String) {
-                        // Parse string using datePattern
-                        try {
-                            date = formatter.parse(obj.toString());
-                        } catch (ParseException e) {
-                            LOG.error("While parsing date", e);
-                        }
-                    } else if (obj instanceof Date) {
-                        // Don't parse anything
-                        date = (Date) obj;
-                    } else {
-                        // consider Long
-                        date = new Date((Long) obj);
-                    }
-                }
-                return date;
-            }
-
-            @Override
-            public void setObject(final Date object) {
-                super.setObject(object);
-            }
-        };
-
-        field.setModel(model);
-        return this;
-    }
-
-    // todo: Evaluate the actual needs to keep this override.
-    @SuppressWarnings("rawtypes")
-    @Override
-    public FieldPanel<Date> setNewModel(final ListItem item) {
-        final FastDateFormat formatter = datePattern == null
-                ? FastDateFormat.getInstance(
-                        SyncopeConstants.DEFAULT_DATE_PATTERN, SyncopeConsoleSession.get().getLocale())
-                : FastDateFormat.getInstance(
-                        datePattern, SyncopeConsoleSession.get().getLocale());
-
-        IModel<Date> model = new Model<Date>() {
-
-            private static final long serialVersionUID = 6799404673615637845L;
-
-            @Override
-            public Date getObject() {
-                Date date = null;
-
-                final Object obj = item.getModelObject();
-
-                if (obj != null && !obj.toString().isEmpty()) {
-                    if (obj instanceof String) {
-                        // Parse string using datePattern
-                        try {
-                            date = formatter.parse(obj.toString());
-                        } catch (ParseException e) {
-                            LOG.error("While parsing date", e);
-                        }
-                    } else if (obj instanceof Date) {
-                        // Don't parse anything
-                        date = (Date) obj;
-                    } else {
-                        // consider Long
-                        date = new Date((Long) obj);
-                    }
-                }
-
-                return date;
-            }
-
-            @Override
-            @SuppressWarnings("unchecked")
-            public void setObject(final Date object) {
-                item.setModelObject(object != null ? formatter.format(object) : null);
-            }
-        };
-
-        field.setModel(model);
-        return this;
-    }
-
-    @Override
-    public FieldPanel<Date> clone() {
-        final FieldPanel<Date> panel = new AjaxDateFieldPanel(getId(), name, new Model<Date>(null), datePattern);
-
-        panel.setRequired(isRequired());
-        panel.setReadOnly(isReadOnly());
-        panel.setTitle(title);
-
-        if (isRequiredLabelAdded) {
-            panel.addRequiredLabel();
-        }
-
-        return panel;
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
new file mode 100644
index 0000000..2d18b44
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateFieldPanel.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import org.apache.syncope.common.lib.SyncopeConstants;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.springframework.util.StringUtils;
+
+public class DateFieldPanel extends FieldPanel<Date> {
+
+    private static final long serialVersionUID = -428975732068281726L;
+
+    protected final String name;
+
+    protected final String datePattern;
+
+    protected DateFieldPanel(final String id, final String name, final IModel<Date> model, final String datePattern) {
+        super(id, name, model);
+        this.name = name;
+        this.datePattern = datePattern;
+    }
+
+    @Override
+    public FieldPanel<Date> setNewModel(final List<Serializable> list) {
+        final SimpleDateFormat formatter = datePattern == null
+                ? new SimpleDateFormat(SyncopeConstants.DEFAULT_DATE_PATTERN, Locale.getDefault())
+                : new SimpleDateFormat(datePattern, Locale.getDefault());
+
+        setNewModel(new Model<Date>() {
+
+            private static final long serialVersionUID = 527651414610325237L;
+
+            @Override
+            public Date getObject() {
+                Date date = null;
+
+                if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) {
+                    try {
+                        // Parse string using datePattern
+                        date = formatter.parse(list.get(0).toString());
+                    } catch (ParseException e) {
+                        LOG.error("invalid parse exception", e);
+                    }
+                }
+
+                return date;
+            }
+
+            @Override
+            public void setObject(final Date object) {
+                list.clear();
+                if (object != null) {
+                    list.add(formatter.format(object));
+                }
+            }
+        });
+
+        return this;
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public FieldPanel<Date> setNewModel(final ListItem item) {
+        final SimpleDateFormat formatter = datePattern == null
+                ? new SimpleDateFormat(SyncopeConstants.DEFAULT_DATE_PATTERN, Locale.getDefault())
+                : new SimpleDateFormat(datePattern, Locale.getDefault());
+
+        IModel<Date> model = new Model<Date>() {
+
+            private static final long serialVersionUID = 6799404673615637845L;
+
+            @Override
+            public Date getObject() {
+                Date date = null;
+
+                final Object obj = item.getModelObject();
+
+                if (obj != null && !obj.toString().isEmpty()) {
+                    if (obj instanceof String) {
+                        // Parse string using datePattern
+                        try {
+                            date = formatter.parse(obj.toString());
+                        } catch (ParseException e) {
+                            LOG.error("While parsing date", e);
+                        }
+                    } else if (obj instanceof Date) {
+                        // Don't parse anything
+                        date = (Date) obj;
+                    } else {
+                        // consider Long
+                        date = new Date((Long) obj);
+                    }
+                }
+
+                return date;
+            }
+
+            @Override
+            @SuppressWarnings("unchecked")
+            public void setObject(final Date object) {
+                item.setModelObject(object != null ? formatter.format(object) : null);
+            }
+        };
+
+        field.setModel(model);
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java
new file mode 100644
index 0000000..464bf55
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Date;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.datetime.markup.html.form.DateTextField;
+import org.apache.wicket.extensions.yui.calendar.DatePicker;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.Response;
+
+public class DateTextFieldPanel extends DateFieldPanel {
+
+    private static final long serialVersionUID = 1919852712185883648L;
+
+    public DateTextFieldPanel(final String id, final String name, final IModel<Date> model, final String datePattern) {
+        super(id, name, model, datePattern);
+
+        field = DateTextField.forDatePattern("field", model, datePattern);
+
+        if (!isReadOnly()) {
+            field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+                private static final long serialVersionUID = -1107858522700306810L;
+
+                @Override
+                protected void onUpdate(final AjaxRequestTarget target) {
+                    // nothing to do
+                }
+            });
+        }
+
+        field.add(getDatePicker());
+
+        add(field.setLabel(new Model<>(name)).setOutputMarkupId(true));
+    }
+
+    /**
+     * Setup a DatePicker component.
+     */
+    private DatePicker getDatePicker() {
+        final DatePicker picker = new DatePicker() {
+
+            private static final long serialVersionUID = 4166072895162221956L;
+
+            @Override
+            protected boolean enableMonthYearSelection() {
+                return true;
+            }
+
+            @Override
+            public void afterRender(final Component component) {
+                Response response = component.getResponse();
+                response.write("\n<span class=\"yui-skin-sam\">&nbsp;<span style=\"");
+
+                if (renderOnLoad()) {
+                    response.write("display:block;");
+                } else {
+                    response.write("display:none;");
+                    response.write("position:absolute;");
+                }
+
+                response.write("z-index: 99999;\" id=\"");
+                response.write(getEscapedComponentMarkupId());
+                response.write("Dp\"></span>");
+
+                if (renderOnLoad()) {
+                    response.write("<br style=\"clear:left;\"/>");
+                }
+                response.write("</span>");
+            }
+        };
+
+        picker.setShowOnFieldClick(true);
+
+        return picker;
+    }
+
+    @Override
+    public FieldPanel<Date> clone() {
+        final FieldPanel<Date> panel = new DateTextFieldPanel(getId(), name, new Model<Date>(), datePattern);
+        panel.setRequired(isRequired());
+        panel.setReadOnly(isReadOnly());
+        panel.setTitle(title);
+
+        if (isRequiredLabelAdded) {
+            panel.addRequiredLabel();
+        }
+
+        return panel;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java
new file mode 100644
index 0000000..4e13a6b
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Calendar;
+import java.util.Date;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.extensions.yui.calendar.DateTimeField;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.form.validation.AbstractFormValidator;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.validation.IValidationError;
+import org.apache.wicket.validation.ValidationError;
+
+public class DateTimeFieldPanel extends DateFieldPanel {
+
+    private static final long serialVersionUID = -428975732068281726L;
+
+    private Form<?> form = null;
+
+    public DateTimeFieldPanel(final String id, final String name, final IModel<Date> model, final String datePattern) {
+        super(id, name, model, datePattern);
+
+        field = new DateTimePickerField("field", model); 
+
+        final Calendar cal = Calendar.getInstance();
+
+        field.get("hours").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @SuppressWarnings("deprecation")
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                final Integer hours = ((DateTimeField) field).getHours();
+                if (hours != null) {
+                    cal.set(hours > 12 ? Calendar.HOUR_OF_DAY : Calendar.HOUR, hours);
+                    field.setModelObject(cal.getTime());
+                }
+            }
+        });
+
+        field.get("minutes").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @SuppressWarnings("deprecation")
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                final Integer minutes = ((DateTimeField) field).getMinutes();
+                if (minutes != null) {
+                    cal.set(Calendar.MINUTE, minutes);
+                    field.setModelObject(cal.getTime());
+                }
+            }
+        });
+
+        field.get("date").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @SuppressWarnings("deprecation")
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                final Date date = ((DateTimeField) field).getDate();
+                if (date == null) {
+                    field.setModelObject(null);
+                } else {
+                    cal.setTime(date);
+                    cal.set(Calendar.AM_PM, "PM".equals("" + ((DateTimeField) field).getAmOrPm())
+                            ? Calendar.PM
+                            : Calendar.AM);
+                    field.setModelObject(cal.getTime());
+                }
+            }
+        });
+
+        field.get("amOrPmChoice").add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @SuppressWarnings("deprecation")
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                cal.set(Calendar.AM_PM, "PM".equals("" + ((DateTimeField) field).getAmOrPm()) ? Calendar.PM
+                        : Calendar.AM);
+                field.setModelObject(cal.getTime());
+            }
+        });
+
+        add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true));
+    }
+
+    /**
+     * Custom form validator for registering and handling DateTimeField components that are in it.
+     */
+    private class DateTimeFormValidator extends AbstractFormValidator {
+
+        private static final long serialVersionUID = 6842264694946633582L;
+
+        private FormComponent<?>[] dateTimeComponents;
+
+        DateTimeFormValidator(final DateTimeField dateTimeComponent) {
+            if (dateTimeComponent == null) {
+                throw new IllegalArgumentException("argument dateTimeComponent cannot be null");
+            }
+
+            dateTimeComponents = new FormComponent<?>[] { dateTimeComponent };
+        }
+
+        @Override
+        public FormComponent<?>[] getDependentFormComponents() {
+            return dateTimeComponents;
+        }
+
+        /**
+         * Validation rule : all 3 fields (date,hours,minutes) must be not-null.
+         *
+         * @param form
+         */
+        @SuppressWarnings("deprecation")
+        @Override
+        public void validate(final Form<?> form) {
+            final DateTimeField dateTimeField = (DateTimeField) dateTimeComponents[0];
+
+            if (!(dateTimeField.getDate() != null && dateTimeField.getHours() != null
+                    && dateTimeField.getMinutes() != null)) {
+
+                ValidationError ve = new ValidationError();
+                ve.setVariables(DateTimeFormValidator.this.variablesMap());
+                ve.addKey(resourceKey());
+                dateTimeComponents[0].error((IValidationError) ve);
+            }
+        }
+    }
+
+    @SuppressWarnings("rawtypes")
+    public FieldPanel<Date> setFormValidator(final Form<?> form) {
+        if (field == null) {
+            LOG.error("Error setting form validator");
+        } else {
+            form.add(new DateTimeFormValidator(((DateTimeField) field)));
+            this.form = form;
+        }
+
+        return this;
+    }
+
+    @Override
+    public FieldPanel<Date> clone() {
+        final FieldPanel<Date> panel = new DateTimeFieldPanel(getId(), name, new Model<Date>(null), datePattern);
+
+        panel.setRequired(isRequired());
+        panel.setReadOnly(isReadOnly());
+        panel.setTitle(title);
+
+        if (isRequiredLabelAdded) {
+            panel.addRequiredLabel();
+        }
+
+        if (form != null && isRequired()) {
+            ((DateTimeFieldPanel) panel).setFormValidator(form);
+        }
+
+        return panel;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.java
new file mode 100644
index 0000000..d59dc0e
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.markup.html.form;
+
+import java.util.Date;
+import java.util.Map;
+import org.apache.wicket.Component;
+import org.apache.wicket.extensions.yui.calendar.DatePicker;
+import org.apache.wicket.extensions.yui.calendar.DateTimeField;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.request.Response;
+import org.apache.wicket.util.string.Strings;
+
+public class DateTimePickerField extends DateTimeField {
+
+    private static final long serialVersionUID = 3733881705516982654L;
+
+    public DateTimePickerField(final String id) {
+        this(id, null);
+    }
+
+    public DateTimePickerField(final String id, final IModel<Date> model) {
+        super(id, model);
+    }
+
+    @Override
+    protected DatePicker newDatePicker() {
+        return new DatePicker() {
+
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            protected void configure(final Map<String, Object> widgetProperties,
+                    final IHeaderResponse response, final Map<String, Object> initVariables) {
+                super.configure(widgetProperties, response, initVariables);
+            }
+
+            @Override
+            public void afterRender(final Component component) {
+                Response response = component.getResponse();
+                response.write("\n<span class=\"yui-skin-sam\">&nbsp;<span style=\"");
+
+                if (renderOnLoad()) {
+                    response.write("display:block;");
+                } else {
+                    response.write("display:none;");
+                    response.write("position:absolute;");
+                }
+
+                response.write("z-index: 99999;\" id=\"");
+                response.write(getEscapedComponentMarkupId());
+                response.write("Dp\"></span><i class=\"glyphicon glyphicon-calendar icon-top-position\"");
+                response.write(" id=\"");
+                response.write(getIconId());
+                response.write("\" ");
+                response.write(" alt=\"");
+                CharSequence alt = getIconAltText();
+                response.write(Strings.escapeMarkup((alt != null) ? alt.toString() : ""));
+                response.write("\" title=\"");
+                CharSequence title = getIconTitle();
+                response.write(Strings.escapeMarkup((title != null) ? title.toString() : ""));
+                response.write("\"/>");
+
+                if (renderOnLoad()) {
+                    response.write("<br style=\"clear:left;\"/>");
+                }
+                response.write("</span>");
+            }
+
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
index 52f9fb8..1a2f6d0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -33,14 +33,16 @@ import org.apache.syncope.client.console.commons.JexlHelpUtils;
 import org.apache.syncope.client.console.commons.Mode;
 import org.apache.syncope.client.console.commons.SchemaUtils;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDateFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxSpinnerFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.BinaryFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.DateTimeFieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
 import org.apache.syncope.common.lib.EntityTOUtils;
+import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.to.AnyTO;
 import org.apache.syncope.common.lib.to.AnyTypeClassTO;
 import org.apache.syncope.common.lib.to.AttrTO;
@@ -200,8 +202,20 @@ public class PlainAttrs extends AbstractAttrs {
                 panel.setRequired(required);
                 break;
             case Date:
-                panel = new AjaxDateFieldPanel(
-                        "panel", schemaTO.getKey(), new Model<Date>(), schemaTO.getConversionPattern());
+                final String dataPattern = schemaTO.getConversionPattern() == null
+                        ? SyncopeConstants.DEFAULT_DATE_PATTERN
+                        : schemaTO.getConversionPattern();
+
+                if (dataPattern.contains("H")) {
+                    panel = new DateTimeFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+                } else {
+                    panel = new DateTextFieldPanel("panel", schemaTO.getKey(), new Model<Date>(), dataPattern);
+                }
+
+                if (required) {
+                    panel.addRequiredLabel();
+                }
+                
                 break;
             case Enum:
                 panel = new AjaxDropDownChoicePanel<>("panel", schemaTO.getKey(), new Model<String>(), false);

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/META-INF/resources/css/search.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/search.css b/client/console/src/main/resources/META-INF/resources/css/search.css
index 29d152f..83cf0b6 100644
--- a/client/console/src/main/resources/META-INF/resources/css/search.css
+++ b/client/console/src/main/resources/META-INF/resources/css/search.css
@@ -61,6 +61,10 @@
   width: 220px;
 }
 
+.clause .textvalue{
+  width: 45px;
+}
+
 .clause .action{
   float: left;
   padding: 0px 7px 0px;

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
index 6aec71b..9785f26 100644
--- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
+++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
@@ -541,3 +541,96 @@ END - Result page
   background-color: #dbffdb;
   border-color: #c1e9c1;
 }
+
+/**
+START - AjaxDateTimePicker
+*/
+.input-auto-width {
+  width: auto !important;
+}
+
+.icon-top-position {
+  top: 5px !important;
+}
+
+/**
+END - AjaxDateTimePicker
+*/
+
+/**
+START - Search - AjaxDateTimePicker
+*/
+.searchBox .col-xs-12{
+  padding-left: 0px !important;
+  padding-right: 0px !important;
+}
+
+.clause{
+  display: block;
+  line-height: 34px;
+  width: 100%;
+}
+
+.clause .operator{
+  width: 65px !important;
+}
+
+.clause .operator .checkbox{
+  margin: 0px !important;
+}
+
+.clause .field {
+  line-height: 34px;
+  float: left;
+  padding: 0 3px 0px 0px;
+  display: inline-block !important;
+}
+
+.clause .type{
+  width: 120px !important;
+}
+
+.clause .property{
+  width: 190px;
+}
+
+.clause .comparator{
+  width: 100px;
+}
+
+.clause .comparator button{
+  width: 100px !important;
+}
+
+.clause .value{
+  width: 220px;
+}
+
+.clause .date{
+  width: 160px;
+}
+
+.clause .hours{
+  width: 45px;
+}
+
+.clause .separator{
+  width: 20px;
+  padding-left: 12px;
+}
+
+.clause .action{
+  float: left;
+  padding: 0px 7px 0px;
+}
+
+.searchBox .input-group-addon:last-child{
+  border: 1px solid #ccc !important;
+}
+
+.searchBox .input-group{
+  margin-top: 1px;
+}
+/**
+END - Search - AjaxDateTimePicker
+*/

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.html
index 70ea03d..190a28f 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.html
@@ -19,9 +19,6 @@ under the License.
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
   <head><title></title></head>
   <body>
-    <wicket:head>
-      <link href="css/search.css" rel="stylesheet" type="text/css" />
-    </wicket:head>
     <wicket:panel>
       <span class="searchBox">
         <div class="col-xs-12">

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.html
deleted file mode 100644
index 1b609e4..0000000
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-  <head>
-    <title>Ajaxt text field panel</title>
-  </head>
-  <body>
-    <wicket:extend>
-      <wicket:enclosure child="field-label">
-        <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
-        <span wicket:id="externalAction"/>
-      </wicket:enclosure>
-      <fieldset class="input-group">
-        <input class="form-control" type="datetime" wicket:id="date"/>
-      </fieldset>
-    </wicket:extend>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html
new file mode 100644
index 0000000..5cde8f1
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.html
@@ -0,0 +1,33 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:extend>
+    <wicket:enclosure child="field-label">
+      <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
+      <span wicket:id="externalAction"/>
+    </wicket:enclosure>
+    <span class="clause">
+      <span style="white-space: nowrap;">
+        <span>
+          <input class="form-control datepicker" type="text" wicket:id="field" size="12" style="float: left"/>
+        </span>
+      </span>
+    </span>
+  </wicket:extend>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html
new file mode 100644
index 0000000..1b11685
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.html
@@ -0,0 +1,36 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:head>
+    <style type="text/css">
+      div.input-group-addon:last-child {
+        border: 1px solid #ccc !important;
+      }
+    </style>
+  </wicket:head>
+  <wicket:extend>
+    <wicket:enclosure child="field-label">
+      <label wicket:id="field-label">[LABEL]</label><span wicket:id="required"/>
+      <span wicket:id="externalAction"/>
+    </wicket:enclosure>
+    <div class="input-group">
+      <span wicket:id="field"/>
+    </div>
+  </wicket:extend>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties
new file mode 100644
index 0000000..9a39f4c
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+field.DateTimeFieldPanel$DateTimeFormValidator=Field '${label0}' must be fully valued

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties
new file mode 100644
index 0000000..c524834
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+field.DateTimeFieldPanel$DateTimeFormValidator=Il campo '${label0}' dev'essere completamente valorizzato

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties
new file mode 100644
index 0000000..95be437
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimeFieldPanel_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+field.DateTimeFieldPanel$DateTimeFormValidator=Campo'${label0}' precisa ser preenchido 

http://git-wip-us.apache.org/repos/asf/syncope/blob/8cee98bc/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.html
new file mode 100644
index 0000000..fc9fbde
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/DateTimePickerField.html
@@ -0,0 +1,41 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+  <wicket:panel>
+    <span class="clause">
+      <span style="white-space: nowrap;">
+        <span class="field date">
+          <input class="form-control input-auto-width" type="text" wicket:id="date" size="12" style="float: left"/>
+        </span>
+        <span class="field hours">
+          <input class="form-control input-auto-width" type="text" wicket:id="hours" size="2" maxlength="2"/>
+        </span>
+        <span class="field separator">
+          <span wicket:id="hoursSeparator">:</span>
+        </span>
+        <span class="field hours">
+          <input class="form-control input-auto-width" type="text" wicket:id="minutes" size="2" maxlength="2"/>
+        </span>
+        <span class="field hours">
+          <select class="form-control input-auto-width" wicket:id="amOrPmChoice"></select>
+        </span>
+      </span>
+    </span>
+  </wicket:panel>
+</html>
\ No newline at end of file