jQuery DatePicker Months Only

by Diman0o

HTML

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css">
<h3>Two different calendars demo:</h3>
<div class="bg-box">
    <label for="startDate">Date (months/year only) :</label>
    <input name="startDate" id="startDate" class="date-picker" />
</div>

<div class="bg-box">
    <label for="startDate2">Date (normal calendar) :</label>
    <input name="startDate2" id="startDate2" class="date-picker" />
</div>

CSS

.ui-datepicker-calendar {
    /* Hide the days */
    display: none;
    }

button.ui-datepicker-current { 
    /* Hide the Today button */
    display: none; 
}

.bg-box { padding:15px; margin:15px; background-color: lightgreen; }

JavaScript

$(function() {
    $('.date-picker').datepicker( {
        numberOfMonths: 2,
       
        
       
    });
});