javascript - disable calendar in datepicker -


i'm using datepicker twice on 1 page. 1 regular, , should picking month of year. unfortunately css style

<style>.ui-datepicker-calendar {display: none;}</style> 

disables calendar both. setting handler on trigger beforeshow like:

$('.date-picker').datepicker( {     changemonth: true,     changeyear: true,     showbuttonpanel: true,     beforeshow: function(date) {         $(".ui-datepicker-calendar").css("display", "none");         alert('fired when selected');     } }); 

also doesn't help. trigger working, calendar still there. can do? appreciated.

you can use css class disable:

.disable{display:none} 

and apply second class in div want hidden.

<div class="ui-datepicker-calendar disable"> calendar here ... </div> 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -