Date display field drupal
Using the Date API module (part of the Date module), you can do something like this...

&lt;?php
$form['payment_expirationDate'] = array(
    '#type' =&gt; 'date_select',
    '#title' =&gt; t('Expiration Date:'),
    '#date_format' =&gt; 'm', OR  '#date_format' =&gt; 'y',
    '#default_value' =&gt; $expirationDate,
    '#date_year_range' =&gt; '-1:+10',
    '#required' =&gt; TRUE,
    '#date_label_position' =&gt; 'within'
 ); 
?&gt;


The date_select type will give you select box form elements for your field. And the #date_format array key allows you to use a PHP date format string to control what select boxes appear and what goes inside them.

Reference