daterangepicker show year and months only
Just add the following css ...
$('input[name="daterange"]').daterangepicker({
singleDatePicker: true,
showDropdowns: true,
minDate: '06/01/2013',
maxDate: '06/30/2015',
format: 'DD/MM/YYYY'
}).on('hide.daterangepicker', function (ev, picker) {
$('.table-condensed tbody tr:nth-child(2) td').click();
alert(picker.startDate.format('MM/YYYY'));
});
.table-condensed thead tr:nth-child(2),
.table-condensed tbody {
display: none
}
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/momentjs/2.9.0/moment.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/bootstrap.daterangepicker/1/daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap.daterangepicker/1/daterangepicker-bs3.css" />
<input name="daterange" value="DD/MM/YYYY">