I created a View and it is working perfectly. There is only an issue with how it's formatting the dropdown list for Month filtering. Right now it's displaying the months in abbreviated format (ex. Jan, Feb, Mar, Apr). I'd like it to display the months in full format (ex. January, February, March, April).

Is there a way to override this behavior?

Thanks for any help.

  • How are you creating this dropdown list?
    – arrubiu
    Mar 25 '13 at 16:05
  • I add a filter criteria of "Date - start date". Go into the settings and under "Date selection form element", I choose "Select".
    – Shane
    Mar 25 '13 at 17:56
function your_module_name_date_select_process_alter(&$element, &$form_state, $context) {
  $element['month']['#options'] = array
    '' => t('Month'),
    1  => t('January'),
    2  => t('February'),
    3  => t('March'),
    4  => t('April'),
    5  => t('May'),
    6  => t('June'),
    7  => t('July'),
    8  => t('August'),
    9  => t('September'),
    10 => t('October'),
    11 => t('November'),
    12 => t('December')
  • Consider adding a bit more description to this code.
    – Mołot
    Jun 19 '13 at 18:10
  • What you not understand? This code is example for using hook hook_date_select_process_alter(&$element, &$form_state, $contect) {}. Form element for exposed filter in views is created by module Date, so we use hook from module Date (see date.api.php)
    – Totoro
    Jun 21 '13 at 9:55

I think its possible you can achieve it by doing like this

views -> arguments

And then add Node: Created year + month:

it worked for me.

What does a monthly archive block achieve?

This Answer might also help you on your way.

Hope it helps

best regards


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.