I have several date pickers on one page, and you only need to display the month and year, while others should show a full calendar with days. I know that to hide days from a lonely datepicker, I can do something like:
<style> .ui-datepicker-calendar { display: none; } </style>
But it hides dates from all calendars. How can I make sure another datepicker keeps the calendar view?
Edit I tried nesting the CSS, but I still can't see anything. For the HTML part, I have roughly:
<div id="monthOnly"><input type="text" class="monthly-picker" name="mdate"></div>
And the code is JS $('.monthly-picker').datepicker();
Still doing something like
<style> #monthOnly .ui-datepicker-calendar { display: none; } </style>
It does not give the desired results.
source share