I have a custom field declared and I am trying to make it sortable. The field holds date values already formatted ie: 06/10/12. How could I make this sortable? I thought this code would work but the header on the table doesn't become hyper linked even.
function uc_order_views_data() {
$data['uc_orders']['data'] = array(
'group' => t('Order') . ':data',
'title' => t('Ship Date'),
'help' => t('The date to ship the order.'),
'field' => array(
'handler' =>'uc_order_handler_field_ship_date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
);
}
I do have the ability to send through a UNIX epoch timestamp instead if that would help me make this sortable so long as I can sort by the epoch but render it as a formatted date. The fact that this is an extension of ubercart bears no factor on the result. Treat this question as if it were just a simple implementation of the views module, which in essence it is.