Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I need to sort user birth date in current month order by birth date, so i make custom order in my_module_views_query_alter(),
but seems datatables sorting is override this customization, is this normal ?
$query->orderby = array(
array(
'field' => "DATE_FORMAT(STR_TO_DATE(field_data_field_birth_date.field_birth_date_value, '%Y-%m-%dT%T'), '%m%d')",
'direction' => 'ASC',
)
);
rgds
Comments
Comment #1
RemovE CreditAttribution: RemovE commentedI think Yes, it`s normal, because jQuery DataTables Plugin override it with it`s own sorting...
Try choosing default sorting value in "Settings" section
Comment #2
dqdWe are on 7.x 2.x so I would say this issue can be closed for now and reopened with changed code version option if somebody wants to report it for 2.x.