title: Webform form alter date hide day
body: <p>I'm relatively new to Drupal 7 and I'm trying to create a custom webform. My goal is to add a date (provided by the date module) field with out the day option. So it displays on month and year hiding the day option.</p>
  
  <p>I have managed to achieve this but only by recreating the wholedate field as a custom field but I wanted to know if it was possible to customize the date field provided by the date module.</p>
  
  <p>Below is a screen shot of my form: <img src="https://i.stack.imgur.com/mfUZm.jpg" alt="enter image description here"></p>
  
  <p>How I create my custom date field:</p>
  
  <pre><code>function my_webform_form_alter(&amp;$form, &amp;$form_state) {
  
        if (isset($form['#node']-&gt;webform) &amp;&amp; $form['#node']-&gt;uuid == '00b20537-d5ce-45c2-af37-150c9e73b96d') {
  
             //$form['submitted']['date']['#type'] = 'hidden';
  
             $form['ggg'] = array(
              '#type' =&gt; 'date_select',
              '#title' =&gt; 'Date',
              '#date_format' =&gt; 'm/Y',
              '#default_value' =&gt; date('Y-m-d')
            );
  
  
        }
      }
  </code></pre>
  
  <p>I have tried other methods on hiding the field components but nothing seem to work so far. I was wondering if I needed to implement a hook different from the alter hook (the one being used).</p>
  
  <p>Any suggestions on how to achieve this?</p>