Index: WAeUP_SRP/trunk/patches/PatchExtendedWidgetsCPSDateTimeWidget.py
===================================================================
--- WAeUP_SRP/trunk/patches/PatchExtendedWidgetsCPSDateTimeWidget.py	(revision 3903)
+++ WAeUP_SRP/trunk/patches/PatchExtendedWidgetsCPSDateTimeWidget.py	(revision 3988)
@@ -10,43 +10,63 @@
     field_id = self.fields[0]
     widget_id = self.getWidgetId()
-    if datastructure.has_key(widget_id + '_date'):
-        date = datastructure[widget_id + '_date'].strip()
-    else:
-        date = datastructure[widget_id].strip()
-    if datastructure.has_key(widget_id + '_hour'):
-        hour = datastructure[widget_id + '_hour'].strip()
-    else:
-        hour = self.time_hour_default
-    if datastructure.has_key(widget_id + '_minute'):
-        minute = datastructure[widget_id + '_minute'].strip()
-    else:
-        minute = self.time_minutes_default
-
-    if not (date):
-        if self.is_required:
-            datastructure[widget_id] = ''
-            datastructure.setError(widget_id, 'cpsschemas_err_required')
-            return 0
-        else:
-            datamodel[field_id] = None
-            return 1
-    #import pdb;pdb.set_trace()
-    if self.view_format.startswith('iso8601'):
-        if re.match(r'^[0-9]+-[0-9]{2}-[0-9]{2}', date) is not None:
-            y, m, d = date.split('-')
-        else:
+    
+    if self.view_format == 'import':
+        try:
+            dt = datastructure[widget_id].strip() 
+            date,time,dummy = dt.split()
+            y,m,d = date.split('/')
+            hour,minute,second = time.split(':')
+        except:
             datastructure.setError(widget_id, 'cpsschemas_err_date')
             return 0
+        if not (date):
+            if self.is_required:
+                datastructure[widget_id] = ''
+                datastructure.setError(widget_id, 'cpsschemas_err_required')
+                return 0
+            else:
+                datamodel[field_id] = None
+                return 1
     else:
-        if re.match(r'^[0-9]?[0-9][/,\-,\.][0-9]?[0-9][/,\-,\.][0-9]{2,4}$', date) is not None:
-            d, m, y = re.split(r'[/,\-,\.]',date) # always use d/m/y and use /,- or . as separator
-            #d, m, y = date.split('/') # always use d/m/y
-            # locale = self.translation_service.getSelectedLanguage()
-            # if False and locale in ('en', 'hu'): 
-            #     m, d, y = date.split('/')
-            # else:
+        if datastructure.has_key(widget_id + '_date'):
+            date = datastructure[widget_id + '_date'].strip()
         else:
-            datastructure.setError(widget_id, 'cpsschemas_err_date')
-            return 0
+            date = datastructure[widget_id].strip()
+        if datastructure.has_key(widget_id + '_hour'):
+            hour = datastructure[widget_id + '_hour'].strip()
+        else:
+            hour = self.time_hour_default
+        if datastructure.has_key(widget_id + '_minute'):
+            minute = datastructure[widget_id + '_minute'].strip()
+        else:
+            minute = self.time_minutes_default
+
+        if not (date):
+            if self.is_required:
+                datastructure[widget_id] = ''
+                datastructure.setError(widget_id, 'cpsschemas_err_required')
+                return 0
+            else:
+                datamodel[field_id] = None
+                return 1
+                
+        #import pdb;pdb.set_trace()
+        if self.view_format.startswith('iso8601'):
+            if re.match(r'^[0-9]+-[0-9]{2}-[0-9]{2}', date) is not None:
+                y, m, d = date.split('-')
+            else:
+                datastructure.setError(widget_id, 'cpsschemas_err_date')
+                return 0
+        else:
+            if re.match(r'^[0-9]?[0-9][/,\-,\.][0-9]?[0-9][/,\-,\.][0-9]{2,4}$', date) is not None:
+                d, m, y = re.split(r'[/,\-,\.]',date) # always use d/m/y and use /,- or . as separator
+                #d, m, y = date.split('/') # always use d/m/y
+                # locale = self.translation_service.getSelectedLanguage()
+                # if False and locale in ('en', 'hu'): 
+                #     m, d, y = date.split('/')
+                # else:
+            else:
+                datastructure.setError(widget_id, 'cpsschemas_err_date')
+                return 0
 
     try:
