Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/pickercontroller/DatePickerController.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/pickercontroller/DatePickerController.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/pickercontroller/DatePickerController.java	(revision 2165)
@@ -7,5 +7,5 @@
  * @author jjdelcerro
  */
 public interface DatePickerController extends PickerController<Date> {
-
+  public void uninstall();
 }
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/ToolsSwingManager.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/ToolsSwingManager.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/ToolsSwingManager.java	(revision 2165)
@@ -51,14 +51,14 @@
      * @return 
      * @deprecated use createColorPickerController
      */
-    public ColorChooserController createColorChooserController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull);
+    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull);
     /**
      * @param txtLabel
      * @param btnShowDialog
      * @return 
      * @deprecated use createColorPickerController
      */
-    public ColorChooserController createColorChooserController(JTextField txtLabel, JButton btnShowDialog);
+    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog);
     /**
      * @param txtLabel
      * @param btnShowDialog
@@ -66,7 +66,7 @@
      * @return 
      * @deprecated use createColorPickerController
      */
-    public ColorChooserController createColorChooserController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha);
+    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha);
     
     
     /**
@@ -147,29 +147,29 @@
 
     public ChangeListenerHelper createChangeListenerHelper();
     
-    public ColorPickerController createColorPickerController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull);
+    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull);
     
-    public ColorPickerController createColorPickerController(JTextField txtLabel, JButton btnShowDialog);
+    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog);
     
-    public ColorPickerController createColorPickerController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha);
+    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha);
     
-    public DatePickerController createDatePickerController(JTextField txtDate, JButton btnDate);
+    public DatePickerController createDatePickerController(JTextComponent txtDate, JButton btnDate);
 
-    public FilePickerController createFilePickerController(JTextField txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon);
+    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon);
 
-    public FilePickerController createFilePickerController(JTextField txtFile, JButton btnFile);
+    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile);
 
-    public FilePickerController createFilePickerController(JTextField txtFile, JButton btnFile, String dialogTitle);
+    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle);
 
-    public FolderPickerController createFolderPickerController(JTextField txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon);
+    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon);
 
-    public FolderPickerController createFolderPickerController(JTextField txtFile, JButton btnFile);
+    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile);
 
-    public FolderPickerController createFolderPickerController(JTextField txtFile, JButton btnFile, String dialogTitle);
+    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle);
 
-    public PickerController<byte[]> createByteArrayPickerController(JTextField txtText, JButton btnUpload, JButton btnDownload, String fileChooserID, File initialPath);
+    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload, String fileChooserID, File initialPath);
 
-    public PickerController<byte[]> createByteArrayPickerController(JTextField txtText, JButton btnUpload, JButton btnDownload);
+    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload);
 
     public void removeBorder(JComponent component);
     
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultToolsSwingManager.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultToolsSwingManager.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultToolsSwingManager.java	(revision 2165)
@@ -10,7 +10,6 @@
 import java.awt.image.BufferedImage;
 import java.awt.image.WritableRaster;
 import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -30,7 +29,6 @@
 import javax.swing.JScrollPane;
 import javax.swing.JSlider;
 import javax.swing.JTabbedPane;
-import javax.swing.JTextField;
 import javax.swing.JTree;
 import javax.swing.JViewport;
 import javax.swing.border.TitledBorder;
@@ -150,17 +148,17 @@
     }
 
     @Override
-    public ColorChooserController createColorChooserController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
+    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
         return new DefaultColorChooserController(txtLabel, btnShowDialog, sldAlpha, allowNull);
     }
 
     @Override
-    public ColorChooserController createColorChooserController(JTextField txtLabel, JButton btnShowDialog) {
+    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog) {
         return new DefaultColorChooserController(txtLabel, btnShowDialog);
     }
 
     @Override
-    public ColorChooserController createColorChooserController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
+    public ColorChooserController createColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
         return new DefaultColorChooserController(txtLabel, btnShowDialog, sldAlpha);
     }
 
@@ -339,22 +337,19 @@
             menuCut.setEnabled(false);
             menuPaste.setEnabled(false);
         }
-        component.addPropertyChangeListener(new PropertyChangeListener() {
-            @Override
-            public void propertyChange(PropertyChangeEvent evt) {
-                if (evt == null) {
-                    return;
-                }
-                if (evt.getPropertyName().equalsIgnoreCase("enabled")) {
-                    boolean enabled = component.isEnabled();
-                    menuCut.setEnabled(enabled);
-                    menuPaste.setEnabled(enabled);
-                } else if (evt.getPropertyName().equalsIgnoreCase("editable")) {
-                    boolean editable = component.isEditable();
-                    menuCut.setEnabled(editable);
-                    menuPaste.setEnabled(editable);
-                }
-            }
+        component.addPropertyChangeListener((PropertyChangeEvent evt) -> {
+          if (evt == null) {
+            return;
+          }
+          if (evt.getPropertyName().equalsIgnoreCase("enabled")) {
+            boolean enabled = component.isEnabled();
+            menuCut.setEnabled(enabled);
+            menuPaste.setEnabled(enabled);
+          } else if (evt.getPropertyName().equalsIgnoreCase("editable")) {
+            boolean editable = component.isEditable();
+            menuCut.setEnabled(editable);
+            menuPaste.setEnabled(editable);
+          }
         });
         component.setComponentPopupMenu(popupMenu);
     }
@@ -376,62 +371,62 @@
     }
 
     @Override
-    public ColorPickerController createColorPickerController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
+    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
         return new ColorPickerControllerImpl(txtLabel, btnShowDialog, sldAlpha, allowNull);
     }
 
     @Override
-    public ColorPickerController createColorPickerController(JTextField txtLabel, JButton btnShowDialog) {
+    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog) {
         return new ColorPickerControllerImpl(txtLabel, btnShowDialog);
     }
 
     @Override
-    public ColorPickerController createColorPickerController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
+    public ColorPickerController createColorPickerController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
         return new ColorPickerControllerImpl(txtLabel, btnShowDialog, sldAlpha);
     }
 
     @Override
-    public DatePickerController createDatePickerController(JTextField txtDate, JButton btnDate) {
+    public DatePickerController createDatePickerController(JTextComponent txtDate, JButton btnDate) {
         return new DatePickerControllerImpl(txtDate, btnDate);
     }
 
     @Override
-    public FilePickerController createFilePickerController(JTextField txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
+    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
         return new FilePickerControllerImpl(txtFile, btnFile, dialogTitle, fileChooserID, initialPath, seticon);
     }
 
     @Override
-    public FilePickerController createFilePickerController(JTextField txtFile, JButton btnFile) {
+    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile) {
         return new FilePickerControllerImpl(txtFile, btnFile);
     }
 
     @Override
-    public PickerController<byte[]> createByteArrayPickerController(JTextField txtText, JButton btnUpload, JButton btnDownload, String fileChooserID, File initialPath) {
+    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload, String fileChooserID, File initialPath) {
         return new BytearrayPickerControllerImpl(txtText, btnUpload, btnDownload, fileChooserID, initialPath);
     }
 
     @Override
-    public PickerController<byte[]> createByteArrayPickerController(JTextField txtText, JButton btnUpload, JButton btnDownload) {
+    public PickerController<byte[]> createByteArrayPickerController(JTextComponent txtText, JButton btnUpload, JButton btnDownload) {
         return new BytearrayPickerControllerImpl(txtText, btnUpload, btnDownload, null, null);
     }
 
     @Override
-    public FilePickerController createFilePickerController(JTextField txtFile, JButton btnFile, String dialogTitle) {
+    public FilePickerController createFilePickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle) {
         return new FilePickerControllerImpl(txtFile, btnFile, dialogTitle);
     }
 
     @Override
-    public FolderPickerController createFolderPickerController(JTextField txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
+    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
         return new FolderPickerControllerImpl(txtFile, btnFile, dialogTitle, fileChooserID, initialPath, seticon);
     }
 
     @Override
-    public FolderPickerController createFolderPickerController(JTextField txtFile, JButton btnFile) {
+    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile) {
         return new FolderPickerControllerImpl(txtFile, btnFile);
     }
 
     @Override
-    public FolderPickerController createFolderPickerController(JTextField txtFile, JButton btnFile, String dialogTitle) {
+    public FolderPickerController createFolderPickerController(JTextComponent txtFile, JButton btnFile, String dialogTitle) {
         return new FolderPickerControllerImpl(txtFile, btnFile, dialogTitle);
     }
 
@@ -483,31 +478,25 @@
         btnClear.setOpaque(false);
         btnClear.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
         if (action == null) {
-            btnClear.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    text.setText("");
-                }
+            btnClear.addActionListener((ActionEvent e) -> {
+              text.setText("");
             });
         } else {
             btnClear.addActionListener(action);
         }
         text.setLayout(new BorderLayout());
         text.add(btnClear, BorderLayout.EAST);
-        text.addPropertyChangeListener(new PropertyChangeListener() {
-            @Override
-            public void propertyChange(PropertyChangeEvent evt) {
-                if (evt == null) {
-                    return;
-                }
-                if (evt.getPropertyName().equalsIgnoreCase("enabled")) {
-                    boolean enabled = text.isEnabled();
-                    btnClear.setEnabled(enabled);
-                } else if (evt.getPropertyName().equalsIgnoreCase("editable")) {
-                    boolean editable = text.isEditable();
-                    btnClear.setEnabled(editable);
-                }
-            }
+        text.addPropertyChangeListener((PropertyChangeEvent evt) -> {
+          if (evt == null) {
+            return;
+          }
+          if (evt.getPropertyName().equalsIgnoreCase("enabled")) {
+            boolean enabled = text.isEnabled();
+            btnClear.setEnabled(enabled);
+          } else if (evt.getPropertyName().equalsIgnoreCase("editable")) {
+            boolean editable = text.isEditable();
+            btnClear.setEnabled(editable);
+          }
         });
     }
 
@@ -626,6 +615,7 @@
         return flc;
     }
 
+    @Override
     public FilteredTreeController createFilteredTreeController(JTree list, JTextComponent text, JButton button) {
         FilteredTreeController ftc = new DefaultFilteredTreeController(list, text, button);
         return ftc;
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/FolderPickerControllerImpl.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/FolderPickerControllerImpl.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/FolderPickerControllerImpl.java	(revision 2165)
@@ -7,8 +7,8 @@
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JFileChooser;
-import javax.swing.JTextField;
 import javax.swing.filechooser.FileFilter;
+import javax.swing.text.JTextComponent;
 import org.apache.commons.lang3.ArrayUtils;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dataTypes.DataTypes;
@@ -32,7 +32,7 @@
     {
     
     private final JButton btnFolder;
-    private final JTextField txtFolder;
+    private final JTextComponent txtFolder;
     private final File initialPath;
     private final String fileChooserID;
     private final String dialogTitle;
@@ -49,15 +49,15 @@
         }
     }
     
-    public FolderPickerControllerImpl(JTextField txtFolder, JButton btnFolder, String dialogTitle) {
+    public FolderPickerControllerImpl(JTextComponent txtFolder, JButton btnFolder, String dialogTitle) {
         this(txtFolder, btnFolder, dialogTitle, null, null, true);
     }
     
-    public FolderPickerControllerImpl(JTextField txtFolder, JButton btnFolder) {
+    public FolderPickerControllerImpl(JTextComponent txtFolder, JButton btnFolder) {
         this(txtFolder, btnFolder, null, null, null, true);
     }
     
-    public FolderPickerControllerImpl(JTextField txtFolder, JButton btnFolder, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
+    public FolderPickerControllerImpl(JTextComponent txtFolder, JButton btnFolder, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
         this.value = null;
         this.txtFolder = txtFolder;
         this.btnFolder = btnFolder;
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/Test.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/Test.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/Test.java	(revision 2165)
@@ -11,6 +11,8 @@
 import java.awt.ComponentOrientation;
 import java.awt.Container;
 import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import javax.swing.Box;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
@@ -196,6 +198,8 @@
       this.pickerDate = new DatePickerControllerImpl(txtDate, btnDate);
       this.pickerFile = new FilePickerControllerImpl(txtFile1, btnFile1);
       this.pickerColor = new ColorPickerControllerImpl(txtColor1, btnColor1);
+      
+      this.setPreferredSize(new Dimension(300, 200));
     }
   }
   /**
@@ -217,6 +221,12 @@
             null,
             WindowManager_v2.BUTTONS_OK_CANCEL
     );
+    dialog.addActionListener(new ActionListener() {
+      @Override
+      public void actionPerformed(ActionEvent e) {
+        System.out.println("Date:"+panel.pickerDate.get());
+      }
+    });
     dialog.show(WindowManager.MODE.WINDOW);
   }
 
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/DatePickerControllerImpl.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/DatePickerControllerImpl.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/DatePickerControllerImpl.java	(revision 2165)
@@ -1,5 +1,6 @@
 package org.gvsig.tools.swing.impl.pickercontroller;
 
+import java.awt.Color;
 import static java.awt.Component.RIGHT_ALIGNMENT;
 import java.awt.event.ActionEvent;
 import java.net.URL;
@@ -12,9 +13,10 @@
 import javax.swing.JButton;
 import javax.swing.JFormattedTextField;
 import javax.swing.JPopupMenu;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.text.Document;
 import javax.swing.text.JTextComponent;
-import javax.swing.text.DateFormatter;
-import javax.swing.text.DefaultFormatterFactory;
 import javax.swing.text.MaskFormatter;
 import org.apache.commons.lang3.StringUtils;
 import org.freixas.jcalendar.DateEvent;
@@ -33,162 +35,220 @@
  * @author jjdelcerro
  */
 @SuppressWarnings("UseSpecificCatch")
-public class DatePickerControllerImpl 
-        extends AbstractPickerController<Date> 
-        implements DatePickerController
-    {
-    
-    private final JButton btnDate;
-    private final JTextComponent txtDate;
-    private JCalendar jcalendar;
-    private DateFormat df;
-    private static final Logger LOG = LoggerFactory.getLogger(DatePickerControllerImpl.class);
-    
-    public static void selfRegister() {
-        URL imageResource = DatePickerControllerImpl.class.getClassLoader().getResource("org/gvsig/tools/swing/picker/picker-date.png");
-        if (imageResource != null) {
-            IconThemeManager iconThemeManager = ToolsSwingLocator.getIconThemeManager();
-            IconTheme theme = iconThemeManager.getCurrent();
-            ImageIcon icon = new ImageIcon(imageResource);
-            theme.registerDefault("tools", "picker", "picker-date", icon, imageResource);
-        }
+public class DatePickerControllerImpl
+        extends AbstractPickerController<Date>
+        implements DatePickerController {
+
+  private final JButton btnDate;
+  private final JTextComponent txtDate;
+  private JCalendar jcalendar;
+  private DateFormat df;
+  private static final Logger LOG = LoggerFactory.getLogger(DatePickerControllerImpl.class);
+
+  public static void selfRegister() {
+    URL imageResource = DatePickerControllerImpl.class.getClassLoader().getResource("org/gvsig/tools/swing/picker/picker-date.png");
+    if (imageResource != null) {
+      IconThemeManager iconThemeManager = ToolsSwingLocator.getIconThemeManager();
+      IconTheme theme = iconThemeManager.getCurrent();
+      ImageIcon icon = new ImageIcon(imageResource);
+      theme.registerDefault("tools", "picker", "picker-date", icon, imageResource);
     }
-    
-    public DatePickerControllerImpl(JTextComponent txtDate, JButton btnDate) {
-        this.txtDate = txtDate;
-        ToolsSwingLocator.getToolsSwingManager().addClearButton(txtDate, (ActionEvent e) -> {
-          set(null);
-            txtDate.setText("");
-        });
-        this.df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault());
-        if( this.txtDate instanceof JFormattedTextField ) {
-            JFormattedTextField ftf = (JFormattedTextField) this.txtDate;
-            DefaultFormatterFactory formatterFactory = new DefaultFormatterFactory(new DateFormatter(df));
-            ftf.setFormatterFactory(formatterFactory);
-            ftf.setFocusLostBehavior(JFormattedTextField.COMMIT_OR_REVERT);
-            if( df instanceof SimpleDateFormat ) {
-              try {
-                SimpleDateFormat sdf = (SimpleDateFormat) this.df;
-                String s = sdf.toPattern(); // d/M/yy H:mm:ss
-                s = s.replace("d", "##");
-                s = s.replace("MM", "##");
-                s = s.replace("M", "##");
-                s = s.replace("y", "#");
-                s = s.replace("HH", "##");
-                s = s.replace("H", "##");
-                s = s.replace("m", "#");
-                
-                s = s.replace("s", "#");
-                MaskFormatter mask = new MaskFormatter(s);
-                mask.setPlaceholderCharacter('_');
-                //mask.setPlaceholder(sdf.format(new Date()));
-                mask.setAllowsInvalid(false);
-                mask.install(ftf);
-              } catch (Exception ex) {
-                  LOG.warn("Not been able to create mask", ex);
-              }
+  }
+  private final Document document;
+  private final DocumentListener documentListener;
+  private final Color colorOk;
+  private final Color colorErr;
+  private String emptyValue;
+
+  public DatePickerControllerImpl(JTextComponent txtDate, JButton btnDate) {
+    this.txtDate = txtDate;
+    if (btnDate == null) {
+      btnDate = new JButton();
+    }
+    ToolsSwingLocator.getToolsSwingManager().addClearButton(txtDate, (ActionEvent e) -> {
+      set(null);
+    });
+    this.df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault());
+    this.df.setLenient(false);
+    if (this.txtDate instanceof JFormattedTextField) {
+      JFormattedTextField ftf = (JFormattedTextField) this.txtDate;
+      if (df instanceof SimpleDateFormat) {
+        try {
+          SimpleDateFormat sdf = (SimpleDateFormat) this.df;
+          String s = sdf.toPattern(); 
+          if( !s.contains("yyyy") ) {
+            if( s.contains("yy") ) {
+              s = s.replace("yy", "yyyy");
+            } else if( s.contains("y") ) {
+              s = s.replace("y", "yyyy");
             }
+          }
+          if( !s.contains("dd") ) {
+            if( s.contains("d") ) {
+              s = s.replace("d", "dd");
+            }
+          }
+          if( !s.contains("MM") ) {
+            if( s.contains("M") ) {
+              s = s.replace("M", "MM");
+            }
+          }
+          sdf.applyPattern(s);
+          s = s.replace("y", "#");
+          s = s.replace("d", "#");
+          s = s.replace("M", "#");
+          MaskFormatter mask = new MaskFormatter(s);
+          mask.setPlaceholderCharacter('_');
+          this.emptyValue = s.replace("#","_");
+          mask.setAllowsInvalid(false);
+          mask.install(ftf);
+        } catch (Exception ex) {
+          LOG.warn("Not been able to create mask", ex);
         }
-        this.btnDate = btnDate;
-        this.txtDate.setAlignmentX(RIGHT_ALIGNMENT);
-        this.txtDate.setEditable(true);
-        
-        this.btnDate.setIcon(this.getIcon("picker-date"));
-        this.btnDate.setText("");
-        
-        this.btnDate.addActionListener((ActionEvent e) -> {
-          doShowCalendar();
-        });
+      }
     }
+    this.colorOk = this.txtDate.getBackground();
+    this.colorErr = new Color(255,225,232);
+    this.btnDate = btnDate;
+    this.txtDate.setAlignmentX(RIGHT_ALIGNMENT);
+    this.txtDate.setEditable(true);
+    this.document = this.txtDate.getDocument();
+    this.documentListener = new DocumentListener() {
+      @Override
+      public void insertUpdate(DocumentEvent e) {
+        checkContents();
+      }
 
-    @Override
-    public boolean isValid() {
-      if( StringUtils.isBlank(this.txtDate.getText()) ) {
-        return true;
+      @Override
+      public void removeUpdate(DocumentEvent e) {
+        checkContents();
       }
-      try {
-        Date date = this.df.parse(this.txtDate.getText());
-        return true;
-      } catch (ParseException ex) {
-        return false;
+
+      @Override
+      public void changedUpdate(DocumentEvent e) {
+        checkContents();
       }
+    };
+    document.addDocumentListener(this.documentListener);
+
+    this.btnDate.setIcon(this.getIcon("picker-date"));
+    if (this.btnDate.getText().equals("...")) {
+      this.btnDate.setText("");
     }
 
-    @Override
-    public boolean isEmpty() {
-      if( StringUtils.isBlank(this.txtDate.getText()) ) {
-        return true;
-      }
-      try {
-        Date date = this.df.parse(this.txtDate.getText());
-        return false;
-      } catch (ParseException ex) {
-        return true;
-      }
+    this.btnDate.addActionListener((ActionEvent e) -> {
+      doShowCalendar();
+    });
+  }
+
+  @Override
+  public void uninstall() {
+
+  }
+  
+  private String getText() {
+    String s = this.txtDate.getText();
+    if( this.emptyValue!=null && this.emptyValue.equals(s) ) {
+      return "";
     }
+    s = s.replace("_", "");
+    return s;
+  }
 
-    @Override
-    public Date get() {
-      if( StringUtils.isBlank(this.txtDate.getText()) ) {
-        return null;
-      }
-      try {
-        Date date = this.df.parse(this.txtDate.getText());
-        return date;
-      } catch (ParseException ex) {
-        return null;
-      }
+  private void checkContents() {
+    if( this.isValid() ) {
+      this.txtDate.setBackground(colorOk);
+    } else {
+      this.txtDate.setBackground(colorErr);
     }
+  }
 
-    @Override
-    public void set(Date date) {
-        if (txtDate instanceof JFormattedTextField) {
-            ((JFormattedTextField) txtDate).setValue(date);
-        }  else {
-            this.txtDate.setText(this.df.format(date));
-        }
+  @Override
+  public boolean isValid() {
+    if (StringUtils.isBlank(this.getText())) {
+      return true;
     }
+    try {
+      Date date = this.df.parse(this.getText());
+      return true;
+    } catch (ParseException ex) {
+      return false;
+    }
+  }
 
-    @Override
-    public void setEnabled(boolean enabled) {
-        this.btnDate.setEnabled(enabled);
-        this.txtDate.setEnabled(enabled);
+  @Override
+  public boolean isEmpty() {
+    if (StringUtils.isBlank(this.getText())) {
+      return true;
     }
+    try {
+      Date date = this.df.parse(this.getText());
+      return false;
+    } catch (ParseException ex) {
+      return true;
+    }
+  }
 
-    @Override
-    public boolean isEnabled() {
-        return this.btnDate.isEnabled();
+  @Override
+  public Date get() {
+    if (StringUtils.isBlank(this.getText())) {
+      return null;
     }
+    try {
+      Date date = this.df.parse(this.getText());
+      return date;
+    } catch (ParseException ex) {
+      return null;
+    }
+  }
 
-    private void doShowCalendar() {
-        if( !this.isEditable() ) {
-            return;
-        }
-        JPopupMenu menu = new JPopupMenu();
-        menu.add(getJCalendar());
-        Date v = this.get();
-        if (v != null) {
-            getJCalendar().setDate(v);
-        }
-        menu.show(this.txtDate, 0, this.txtDate.getY() + this.txtDate.getPreferredSize().height);
-        this.set(getJCalendar().getDate());
-        this.fireChangeEvent();
+  @Override
+  public void set(Date date) {
+    if( date == null ) {
+      this.txtDate.setText("");
+      return;
     }
+    this.txtDate.setText(this.df.format(date));
+  }
 
-    protected JCalendar getJCalendar() {
-        if (this.jcalendar == null) {
-            this.jcalendar = new JCalendar();
-            this.jcalendar.addDateListener((DateEvent arg0) -> {
-              set(getJCalendar().getDate());
-              fireChangeEvent();
-            });
-        }
-        return (JCalendar) this.jcalendar;
+  @Override
+  public void setEnabled(boolean enabled) {
+    this.btnDate.setEnabled(enabled);
+    this.txtDate.setEnabled(enabled);
+  }
+
+  @Override
+  public boolean isEnabled() {
+    return this.btnDate.isEnabled();
+  }
+
+  private void doShowCalendar() {
+    if (!this.isEditable()) {
+      return;
     }
+    JPopupMenu menu = new JPopupMenu();
+    menu.add(getJCalendar());
+    Date v = this.get();
+    if (v != null) {
+      getJCalendar().setDate(v);
+    }
+    menu.show(this.txtDate, 0, this.txtDate.getY() + this.txtDate.getPreferredSize().height);
+  }
 
-    @Override
-    public void coerceAndSet(Object value) {
-        this.set((Date) this.coerce(DataTypes.DATE, value, new Date()));
+  protected JCalendar getJCalendar() {
+    if (this.jcalendar == null) {
+      this.jcalendar = new JCalendar();
+      this.jcalendar.addDateListener((DateEvent arg0) -> {
+        set(getJCalendar().getDate());
+        fireChangeEvent();
+      });
     }
-    
+    return (JCalendar) this.jcalendar;
+  }
+
+  @Override
+  public void coerceAndSet(Object value) {
+    this.set((Date) this.coerce(DataTypes.DATE, value, new Date()));
+  }
+
 }
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/ColorPickerControllerImpl.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/ColorPickerControllerImpl.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/ColorPickerControllerImpl.java	(revision 2165)
@@ -11,10 +11,10 @@
 import javax.swing.JButton;
 import javax.swing.JColorChooser;
 import javax.swing.JSlider;
-import javax.swing.JTextField;
 import javax.swing.SwingUtilities;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
+import javax.swing.text.JTextComponent;
 
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.i18n.I18nManager;
@@ -31,7 +31,7 @@
         implements ColorPickerController
     {
 
-    private final JTextField txtLabel;
+    private final JTextComponent txtLabel;
     private final JButton btnShowDialog;
     private final JSlider sldAlpha;
     private Color color;
@@ -48,7 +48,7 @@
         }
     }
     
-    public ColorPickerControllerImpl(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
+    public ColorPickerControllerImpl(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
         this.txtLabel = txtLabel;
         this.btnShowDialog = btnShowDialog;
         this.sldAlpha = sldAlpha;
@@ -67,20 +67,14 @@
                 sldAlpha.removeChangeListener(l);
             }
         }
-        this.btnShowDialog.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                doShowDialog();
-            }
+        this.btnShowDialog.addActionListener((ActionEvent e) -> {
+          doShowDialog();
         });
         if( this.sldAlpha != null ) {
             this.sldAlpha.setMinimum(0);
             this.sldAlpha.setMaximum(255);
-            this.sldAlpha.addChangeListener(new ChangeListener() {
-                @Override
-                public void stateChanged(ChangeEvent e) {
-                    doAlphaChanged();
-                }
+            this.sldAlpha.addChangeListener((ChangeEvent e) -> {
+              doAlphaChanged();
             });
         }
         Font font = this.txtLabel.getFont();
@@ -97,11 +91,11 @@
         }
     }
 
-    public ColorPickerControllerImpl(JTextField txtLabel, JButton btnShowDialog) {
+    public ColorPickerControllerImpl(JTextComponent txtLabel, JButton btnShowDialog) {
         this(txtLabel, btnShowDialog, null, false);
     }
 
-    public ColorPickerControllerImpl(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
+    public ColorPickerControllerImpl(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
         this(txtLabel, btnShowDialog, sldAlpha, false);
     }
 
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/FilePickerControllerImpl.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/FilePickerControllerImpl.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/FilePickerControllerImpl.java	(revision 2165)
@@ -1,7 +1,6 @@
 package org.gvsig.tools.swing.impl.pickercontroller;
 
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
 import java.io.File;
@@ -9,8 +8,8 @@
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JFileChooser;
-import javax.swing.JTextField;
 import javax.swing.filechooser.FileFilter;
+import javax.swing.text.JTextComponent;
 import org.apache.commons.lang3.ArrayUtils;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dataTypes.DataTypes;
@@ -33,7 +32,7 @@
         implements FilePickerController {
 
     private final JButton btnFile;
-    private final JTextField txtFile;
+    private final JTextComponent txtFile;
     private final File initialPath;
     private final String fileChooserID;
     private final String dialogTitle;
@@ -57,15 +56,15 @@
         }
     }
 
-    public FilePickerControllerImpl(JTextField txtFile, JButton btnFile, String dialogTitle) {
+    public FilePickerControllerImpl(JTextComponent txtFile, JButton btnFile, String dialogTitle) {
         this(txtFile, btnFile, dialogTitle, null, null, true);
     }
 
-    public FilePickerControllerImpl(JTextField txtFile, JButton btnFile) {
+    public FilePickerControllerImpl(JTextComponent txtFile, JButton btnFile) {
         this(txtFile, btnFile, null, null, null, true);
     }
 
-    public FilePickerControllerImpl(JTextField txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
+    public FilePickerControllerImpl(JTextComponent txtFile, JButton btnFile, String dialogTitle, String fileChooserID, File initialPath, boolean seticon) {
         this.value = null;
         this.txtFile = txtFile;
         this.btnFile = btnFile;
@@ -81,19 +80,13 @@
             this.btnFile.setIcon(this.getIcon("picker-file"));
             this.btnFile.setText("");
         }
-        this.btnFile.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                doSelectFile();
-            }
+        this.btnFile.addActionListener((ActionEvent e) -> {
+          doSelectFile();
         });
         ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager();
         toolsSwingManager.setDefaultPopupMenu(txtFile);
-        toolsSwingManager.addClearButton(txtFile, new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                doClear();
-            }
+        toolsSwingManager.addClearButton(txtFile, (ActionEvent e) -> {
+          doClear();
         });
         //this.txtFile.setEditable(false);
         this.txtFile.addKeyListener(new KeyAdapter() {
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/BytearrayPickerControllerImpl.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/BytearrayPickerControllerImpl.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/BytearrayPickerControllerImpl.java	(revision 2165)
@@ -1,13 +1,12 @@
 package org.gvsig.tools.swing.impl.pickercontroller;
 
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.io.File;
 import java.net.URL;
 import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JFileChooser;
-import javax.swing.JTextField;
+import javax.swing.text.JTextComponent;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.gvsig.tools.ToolsLocator;
@@ -28,7 +27,7 @@
         extends AbstractPickerController<byte[]> 
     {
     
-    private final JTextField jtext;
+    private final JTextComponent jtext;
     private final JButton btnUpload;
     private final JButton btnDownload;
     
@@ -37,7 +36,7 @@
     private final File initialPath;
     
     public BytearrayPickerControllerImpl(
-            JTextField jtext,
+            JTextComponent jtext,
             JButton btnUpload,
             JButton btnDownload,
             String fileChooserID, 
@@ -51,19 +50,13 @@
         
         this.btnDownload.setText("");
         this.btnDownload.setIcon(this.getIcon("picker-bytearray-download"));
-        this.btnDownload.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                doDownload();
-            }
+        this.btnDownload.addActionListener((ActionEvent e) -> {
+          doDownload();
         });
         this.btnUpload.setText("");
         this.btnUpload.setIcon(this.getIcon("picker-bytearray-upload"));
-        this.btnUpload.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                doUpload();
-            }
+        this.btnUpload.addActionListener((ActionEvent e) -> {
+          doUpload();
         });
         
         this.jtext.setEditable(false);
Index: org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultColorChooserController.java
===================================================================
--- org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultColorChooserController.java	(revision 2164)
+++ org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultColorChooserController.java	(revision 2165)
@@ -9,10 +9,10 @@
 import javax.swing.JButton;
 import javax.swing.JColorChooser;
 import javax.swing.JSlider;
-import javax.swing.JTextField;
 import javax.swing.SwingUtilities;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
+import javax.swing.text.JTextComponent;
 
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.i18n.I18nManager;
@@ -22,14 +22,14 @@
 
 public class DefaultColorChooserController implements ColorChooserController {
 
-    private final JTextField txtLabel;
+    private final JTextComponent txtLabel;
     private final JButton btnShowDialog;
     private final JSlider sldAlpha;
     private Color color;
     private boolean allowNull;
     private ChangeListener changeListener;
 
-    public DefaultColorChooserController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
+    public DefaultColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) {
         this.txtLabel = txtLabel;
         this.btnShowDialog = btnShowDialog;
         this.sldAlpha = sldAlpha;
@@ -42,20 +42,14 @@
         for( ChangeListener l : sldAlpha.getChangeListeners()) {
             sldAlpha.removeChangeListener(l);
         }
-        this.btnShowDialog.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                doShowDialog();
-            }
+        this.btnShowDialog.addActionListener((ActionEvent e) -> {
+          doShowDialog();
         });
         if( this.sldAlpha != null ) {
             this.sldAlpha.setMinimum(0);
             this.sldAlpha.setMaximum(255);
-            this.sldAlpha.addChangeListener(new ChangeListener() {
-                @Override
-                public void stateChanged(ChangeEvent e) {
-                    doAlphaChanged();
-                }
+            this.sldAlpha.addChangeListener((ChangeEvent e) -> {
+              doAlphaChanged();
             });
         }
         Font font = this.txtLabel.getFont();
@@ -72,11 +66,11 @@
         }
     }
 
-    public DefaultColorChooserController(JTextField txtLabel, JButton btnShowDialog) {
+    public DefaultColorChooserController(JTextComponent txtLabel, JButton btnShowDialog) {
         this(txtLabel, btnShowDialog, null, false);
     }
 
-    public DefaultColorChooserController(JTextField txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
+    public DefaultColorChooserController(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha) {
         this(txtLabel, btnShowDialog, sldAlpha, false);
     }
 
