Looks like this is something we have already on drupal issue-queue as https://www.drupal.org/node/2296607.
I was expecting the options to be alterable by any hook, unfortunately could not find any.
I explored the code in date module, and found the elements are processed by a function as date_parts_element, under which it appending '-' before the label.
Now, while the following will fix your issue but I would nor recommend it to you until it is approved by community. The hack is
In your date_api_elements.inc file(date/date_api) inside function date_parts_element
add this line drupal_alter('date_process_element', $sub_element);
in the bottom just before return $element;
so it looks as
.....
if ($element['#date_label_position'] == 'within') {
$sub_element['ampm']['#options'] = array('' => '-' . $label) + $sub_element['ampm']['#options'];
}
}
drupal_alter('date_process_element', $sub_element);
return $sub_element;
}
This will allow any custom module to alter the elements of date filter. Now in your custom module let's say named as my_module implement the hook we have added as following
/**
* Implements hook_date_process_element_alter.
*/
function my_module_views_date_process_element_alter(&$element) {
foreach($element['year']['#options'] as $key=>$value) {
if($value == '-Year') {
$element['year']['#options'][$key] = 'Year';// Or whatever you like to give.
}
}
}
I will be adding the same suggestion on drupal issue page.
Update
Indeed no patch required, date module provides the hooks out of the box, got to know from update mentioned issue feeds, didn't try the cpde myself but looks promising
function MYMODULE_date_select_process_alter(&$element, &$form_state, $context) {
// Tweak the -Year filter to remove the -
if (empty($element['year'])) return;
foreach ($element['year']['#options'] as $key => $value) {
if ($value == '-Year') {
$element['year']['#options'][$key] = 'Select Year';
break;
}
}
}