diff --git a/date_single_day.info b/date_single_day.info
index 3971577..7c5ec41 100644
--- a/date_single_day.info
+++ b/date_single_day.info
@@ -1,6 +1,6 @@
 name = Date single day
-description = Change CCK date popup form elements to show only the date on the 'To' field.
-dependencies[] = date
-dependencies[] = date_popup
+description = Change date popup form elements to show only time on the 'To' field.
 package = Date/Time
-core = 6.x
+core = 7.x
+
+dependencies[] = date
\ No newline at end of file
diff --git a/date_single_day.module b/date_single_day.module
index 33a902d..c8a4324 100644
--- a/date_single_day.module
+++ b/date_single_day.module
@@ -1,170 +1,144 @@
 <?php
 /**
- * @file date_single_day.module
- * Alter CCK date fields.
+ *  Implements hook_field_widget_info_alter().
  */
+function date_single_day_field_widget_info_alter(&$info) {
+  // Add single day setting to widgets.
+  $info['date_select']['settings'] += array(
+    'date_single_day' => 0,
+  );
+  $info['date_text']['settings'] += array(
+    'date_single_day' => 0,
+  );
+  if (module_exists('date_popup')) {
+    $info['date_popup']['settings'] += array(
+      'date_single_day' => 0,
+    );
+  }
+}
 
 /**
- * Implementation of hook_widget_settings_alter().
- *
- * Add our checkbox to date popup field settings.
- *
- * Cribbed from http://www.gizra.com/content/hookwidgetsettingsalter-and-pandora
+ *  Implements hook_date_field_widget_settings_form_alter().
  */
-function date_single_day_widget_settings_alter(&$settings, $op, $widget) {
-  $widget_types = array('date_popup', 'date_popup_repeat');
-  if ((!empty($widget['type']) && in_array($widget['type'], $widget_types)) || (!empty($widget['widget_type']) && in_array($widget['widget_type'], $widget_types))) {
-    switch ($op) {
-      case 'form':
-        $settings['input']['single_day'] = array(
-          '#type' => 'checkbox',
-          '#title' => t('Show single day'),
-          '#description' => t("Show only the time portion of the 'To' field. Use this for dates which will only ever span a single day."),
-          '#default_value' => !empty($widget['single_day']),
-        );
+function date_single_day_date_field_widget_settings_form_alter(&$form, $context) {
 
-        break;
-      case 'save':
-        $settings[] = 'single_day';
-        break;
-    }
+  $field = $context['field'];
+  $instance = $context['instance'];
+  $settings = $instance['widget']['settings'];
+  
+  // Add widget setting for this module
+  $form['date_single_day'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show single day'),
+    '#default_value' => (empty($settings['date_single_day']) ? FALSE : TRUE),
+    '#description' => t('Show only the time portion of the "To" field. Use this for dates which will only ever span a single day.'),
+    '#weight' => 8,
+    '#fieldset' => 'date_format',
+  );
+  
+  // Hide the single day setting end date is disabled
+  if (empty($field['settings']['todate'])) {
+    $form['date_single_day']['#type'] = 'value';
+    $form['date_single_day']['#value'] = 0;
   }
 }
 
 /**
- * Implementation of hook_form_alter().
+ *  Implements hook_element_info_alter().
  */
-function date_single_day_form_alter(&$form, $form_state, $form_id) {  
-  // Alter node edit forms.
-  if (isset($form['type']) && $form['type']['#value'] . '_node_form' == $form_id) {
-    // Get fields on this node type.
-    $fields = content_fields(NULL, $form['type']['#value']);
-    
-    foreach ($fields as $field_name => $field) {
-      // Alter fields with the single_day setting.
-      if (!empty($field['widget']['single_day'])) {
-        // @todo: support fields in fieldgroups.
-        if (isset($form[$field_name])) {
-          // Use after_build to go after CCK does its magic in the #process step.
-          // Handle regular dates and repeating dates separately.
-          switch ($field['widget']['type']) {
-            case 'date_popup':
-              // Regular date pop-up.
-              // Alter each value of a potentially multiple valued field.
-              // Note we don't use element_children() because that catches the
-              // 'add more' button.
-              foreach (array_keys($form[$field_name]) as $key) {
-                if (is_numeric($key)) {
-                  $form[$field_name][$key]['#after_build'][] = 'date_single_day_after_build';
-                  $form[$field_name][$key]['#theme'][] = 'date_single_day_element';
-                }
-              }
-              break;
-            case 'date_popup_repeat':
-              // Date pop-up with repeat options.
-              $form[$field_name]['#after_build'][] = 'date_single_day_after_build';
-              $form[$field_name]['#theme'][] = 'date_single_day_element';
-          }
-        }
-      }
-    }
+function date_single_day_element_info_alter(&$type) {
+  // Additional #pre_render callback to date_combo field.
+  // Removes second date field, adds end time field.
+  if(empty($type['date_combo']['#pre_render'])) {
+    $type['date_combo']['#pre_render'] = array();
+  }
+  $type['date_combo']['#pre_render'][] = 'date_single_day_date_combo_pre_render';
+
+  // Additional #process callback to date_combo field.
+  // Recreates data removed in #pre_render callback
+  if(empty($type['date_combo']['#process'])) {
+    $type['date_combo']['#process'] = array();
   }
-  // Alter AJAX forms produced by the 'Add another item' button.
-  elseif ($form_id == 'content_add_more_js') {
-    foreach ($form as $field_name => $field) {
-      foreach (array_keys($form[$field_name]) as $key) {
-        if (is_numeric($key)) {
-          if (isset($form[$field_name][$key]['#type']) && in_array($form[$field_name][$key]['#type'], array('date_popup', 'date_combo'))) {
-            $content_fields = content_fields(NULL, $form[$field_name][$key]['#type']);
-            if (!empty($content_fields[$field_name]['widget']['single_day'])) {
-              $form[$field_name][$key]['#after_build'][] = 'date_single_day_after_build';
-              $form[$field_name][$key]['#theme'][] = 'date_single_day_element';
-            }
-          }
-        }
-      }
+  array_unshift($type['date_combo']['#process'], 'date_single_day_date_combo_element_process');
+  
+  
+  // @TODO: Check if this works as expected, can additional validation from other
+  //        modules break this?
+  
+  // Additional #process callback to date_popup field,
+  // Add dummy end date to pass validation.
+  if (module_exists('date_popup')) {
+    if(empty($type['date_popup']['#process'])) {
+      $type['date_popup']['#process'] = array();
     }
+    array_unshift($type['date_popup']['#process'], 'date_single_day_date_popup_process');
   }
 }
 
 /**
- * After_build for the date field.
+ *  #pre_render callback for date_combo elements.
  */
-function date_single_day_after_build($form, &$form_state) {
-  //dsm($form);
-  
-  // Hide the 'To' date element. 
-  // 'hidden' works; 'value' does not.
-  $form['value2']['date']['#type'] = 'hidden';
-  $form['value2']['date']['#value'] = '';
-  $form['#value']['value2']['date'] = '';
+function date_single_day_date_combo_pre_render(&$element) {
+  $instance = $element['value']['#instance'];
+  $widget = $instance['widget'];
+  $settings = $widget['settings'];
   
-  // Put our validation first.
-  // array_push($form['value2']['#element_validate'], 'date_single_day_validate');
-
-  return $form;
-}
-
-/*
-// The plan here was to intercept validation before date_popup's own
-// validation and set the value of the to date to the same as the from date.
-// However, there seems to be no sign whatsoever of the to time value!
-function date_single_day_validate($element, &$form_state) {
-  dsm($form_state);
-  // the time doens't get here/
-  if (1) {
-   // form_error($element, t('boogaloo.'));
+  if($settings['date_single_day']) {
+    // Add end time to start date, remove end date
+    $element['value']['endtime'] = $element['value2']['time'];
+   
+    $element['value']['time']['#title'] = t('Start Time');
+    $element['value']['endtime']['#title'] = t('End Time');
+    
+    if(!empty($element['value2']['#states'])) {
+      $element['value']['endtime']['#states'] = $element['value2']['#states'];
+    }
+    unset($element['value2']);
   }
+  return $element;
 }
-*/
+
 
 /**
- * Theme the date field elements.
+ *  #process callback for date_combo elements.
  */
-function theme_date_single_day_element($form) {
-  //dsm($form);
-  
-  // Cascade the required value down into the subcomponent for theme_form_element to find it.
-  if ($form['#required']) {
-    $form['value']['date']['#required'] = TRUE;
-  }
+function date_single_day_date_combo_element_process($element, &$form_state, $form) {
 
-  // Render the 'from' date
-  // Set titles in the individual form elements.
-  $form['value']['date']['#title'] = 'Date';
-  $output = drupal_render($form['value']['date']);
+  // Form state indexes
+  $field_name = $element['#field_name'];
+  $delta = $element['#delta'];
+  $langcode = $element['#language'];
   
-  // Container to float the two times; though this doesn't work.
-  // @todo: figure out how the CSS from date module works and whether it can
-  // be repurposed here.
-  $output .= '<div class="container-inline-date">';
+  $settings = $form_state['field'][$field_name][$langcode]['instance']['widget']['settings'];
 
-  $form['value']['time']['#title'] = t('From time');
-  $output .= drupal_render($form['value']['time']);
-  
-  $output .= drupal_render($form['value2']['date']);
-  
-  $form['value2']['time']['#title'] = t('To time');
-  $output .= drupal_render($form['value2']['time']);
+  if(!empty($settings['date_single_day'])) {
 
-  // Render the repeat options if present.
-  if (isset($form['rrule'])) {
-    $output .= drupal_render($form['rrule']);
+    // @TODO: If end time is less than start time
+    //        add one day to end date ?
+    
+    // Add start date as end date to element
+    $element['#value']['value2']['date'] = $element['#value']['value']['date']; 
+    
+    // Add date info to form state
+    $input = &$form_state['input'][$field_name][$langcode][$delta];
+    $input['value2']['date'] = $input['value']['date']; 
+    
+    $item = &$form_state['values'][$field_name][$langcode][$delta];
+    $item['value2']['date'] = $item['value']['date']; 
   }
-
-  $output .= '</div>'; 
-  
-  return $output;
+  return $element;
 }
 
 /**
- * Implementation of hook_theme().
+ *  #process callback for date_popup elements.
  */
-function date_single_day_theme($existing, $type, $theme, $path) {
-  return array(
-    'date_single_day_element' => array(
-      'arguments' => array('arg1' => NULL, 'arg2' => 0, 'arg3' => FALSE),
-    ),
-  );
+function date_single_day_date_popup_process(&$element, &$form_state, $form) {
+  $settings = $element['#instance']['widget']['settings'];  
+  
+  if($settings['date_single_day'] && end($element['#parents']) == 'value2') {
+    // Add default date to field in order to pass date popup processing.
+    $default_dates = date_popup_element_value_callback($element, FALSE, $form_state);
+    $element['#value']['date'] = $default_dates['date'];
+  }
+  return $element;
 }
-
