diff -Naur stormtaskOrig/stormtask.module stormtask/stormtask.module
--- stormtaskOrig/stormtask.module	2009-06-28 20:13:58.000000000 +0200
+++ stormtask/stormtask.module	2009-07-05 01:37:24.000000000 +0200
@@ -476,6 +540,30 @@
   return $form;
 }
 
+
+function stormtask_form_alter(&$form, $form_state, $form_id) {
+  if (module_exists('date_api')) {
+    if ('stormtask_node_form' == $form_id) {
+	$node = $form['#node'];
+	$form['group4']['datebegin'] = array(
+	  '#type' => 'date_popup',
+	  '#title' => t('Date begin'),
+	  '#date_format' =>  'Y-m-d',
+	  '#default_value' => date('Y-m-d',$node->datebegin),
+	);
+
+	$form['group4']['dateend'] = array(
+	  '#type' => 'date_popup',
+	  '#title' => t('Date end'),
+	  '#date_format' =>  'Y-m-d',
+	  '#default_value' => date('Y-m-d',$node->dateend),
+	);
+    }
+  }
+}
+
+
+
 function stormtask_insert($node) {
   _stormtask_beforesave($node);
   db_query("INSERT INTO {stormtask}
@@ -532,8 +620,19 @@
   $p = db_fetch_object($r);
   $node->project_title = $p->title;
 
-  if (is_array($node->datebegin)) $node->datebegin = _storm_date_to_gmtimestamp($node->datebegin);
-  if (is_array($node->dateend)) $node->dateend = _storm_date_to_gmtimestamp($node->dateend);
+  if (is_array($node->datebegin)){
+      $node->datebegin = _storm_date_to_gsmtimestamp($node->datebegin);
+  }
+  else {
+      $node->datebegin = strtotime($node->datebegin);
+  }
+ 
+  if (is_array($node->dateend)){
+      $node->dateend = _storm_date_to_gmtimestamp($node->dateend);
+  }
+  else {
+      $node->dateend = strtotime($node->dateend);
+  }
 }
 
 function stormtask_nodeapi(&$node, $op, $teaser, $page) {

diff -Naur stormtaskOrig/stormtask.views.inc stormtask/stormtask.views.inc
--- stormtaskOrig/stormtask.views.inc	2009-05-14 00:41:35.000000000 +0200
+++ stormtask/stormtask.views.inc	2009-07-05 01:16:57.000000000 +0200
@@ -232,3 +232,38 @@
     ),
   );
 }
+
+/**
+ * Implementation of hook_date_api_fields().
+ * on behalf of core fields.
+ * 
+ * All modules that create custom fields that use the 
+ * 'views_handler_field_date' handler can provide
+ * additional information here about the type of
+ * date they create so the date can be used by
+ * the Date API views date argument and date filter.
+ */
+function stormtask_date_api_fields($field) {
+  $values = array(
+    'sql_type' => DATE_UNIX, 
+    'tz_handling' => 'site',
+    'timezone_field' => '', 
+    'offset_field' => '', 
+    'related_fields' => array(),
+    'granularity' => array('year', 'month', 'day', 'hour', 'minute', 'second'),
+  );
+
+  switch ($field) {
+    case 'stormtask.datebegin':
+    case 'stormtask.dateend':
+      return $values;
+  }
+
+}
+
+/**
+ * Implement hook_date_api_tables().
+ */
+function stormtask_date_api_tables() {
+  return array('stormtask');
+}
\ No newline at end of file
