I'm using Django and I'm using 4 datepickers one page. Currently, 4 calendars can be selected year, month, and day. I want to adjust only the 2 datepickers here to show only year and month. #from_month_date_full.ui-datepicker-calendar: none; does not apply. How to apply ui-calendar-display only to datepicker with ids #from-month_date_full and #to_month_date_full ?
<script src="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.12.1/jquery-ui.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"></script>
$(function() {
$( "#fromDate, #toDate" ).datepicker({
dateFormat: "yy-mm-dd"
});
$('#from_month_date_full, #to_month_date_full').datepicker({
showMonthAfterYear:true,
monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
altField: '#from_month_date',
altFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
showAnim: 'slideDown',
yearRange: '-10:+0',
onChangeMonthYear:function(y, m, i){
var d = i.selectedDay;
$(this).datepicker('setDate', new Date(y, m-1, 1));
$('#to_month_date_full').datepicker('setDate', new Date(y, m, 0))
}
});
});