I am using bootstrap datepicker and my code is like following, Demo of the code on jsfiddle
<div class="input-append date" id="datepicker" data-date="02-2012"
data-date-format="mm-yyyy">
<input type="text" readonly="readonly" name="date" >
<span class="add-on"><i class="icon-th"></i></span>
</div>
$("#datepicker").datepicker({
viewMode: 'years',
format: 'mm-yyyy'
});
The above code is working fine, but what I am trying to do is allow users pick months and years only.
Could you please tell me how to do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…