hiding the calendar on datapicker
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$('.year').datepicker({
  changeMonth: true,
  changeYear: true,
  showButtonPanel: true,
  dateFormat: 'MM yy',
  onOpen: function(dateText, inst) {
    $("table.ui-datepicker-calendar").addClass('hide')
  },
  onClose: function(dateText, inst) {
    var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
    var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
    $(this).datepicker('setDate', new Date(year, month, 1));
  }
});

$('.datepicker').datepicker({
  changeMonth: true,
  changeYear: true,
  showButtonPanel: true,
  dateFormat: 'MM yy dd',
  onClose: function(dateText, inst) {
    var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
    var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
    $(this).datepicker('setDate', new Date(year, month, 1));
  }
});</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>.hide {
  display: none; 
}

.ui-datepicker-calendar {
  &lt;!--  display: none; --&gt;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"&gt;&lt;/script&gt;
&lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" rel="stylesheet" /&gt;

&lt;input class="year" type="text" id="" /&gt;
&lt;input class="datepicker" type="text" id="" /&gt;</code></pre>
</div>
</div>
</p>

<p>What i want is when i click on year it will not show calendar.</p>

<p>I could put it like </p>

<pre><code>.ui-datepicker-calendar {
  display: none;
}
</code></pre>

<p>But if i do this this will affect all date pickers. What i need is to specify the date picker where i need to hide the calendar</p>