You just have to call like this
$(".date-picker").datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
<big> dateFormat: 'MM yy',</big>
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));
}
});
Or visit this link
http://www.jquerybyexample.net/2012/06/show-only-month-and-year-in-jquery-ui.html[
^]