daterangepicker show year and months only
问题 I'm using daterangepicker bootstrap 3. $('#pa_date*').daterangepicker({ singleDatePicker: true, showDropdowns: true, minDate: min, maxDate: max, format: 'DD/MM/YYYY' }).on('apply.daterangepicker', function (ev, picker) { alert(picker.startDate.format('MM/YYYY')); }); It shows me the full daterangepicker: I want to hide the calendar and show only years and months drop-down, like this: 回答1: Just add the following css ... $('input[name="daterange"]').daterangepicker({ singleDatePicker: true,