I am using a Jquery datepicker. I want the button panel to be visible, but I do not want the "Done" button. According to the Jquery UI page here
Display a button for selecting Today's date and a Done button for closing the calendar with the boolean showButtonPanel option. Each button is enabled by default when the bar is displayed, but can be turned off with additional options.
What are the options for turning off the Done button? My code:
<script>
$(function() {
$( "#JourneyDate" ).datepicker({
showButtonPanel: true,
showWeek: true,
maxDate: "+0",
dateFormat: 'd MM yy',
changeMonth: true,
changeYear: true
});
});
</script>
I tried accessing the button using selector ui-datepicker-close
and calling remove()
but that does not seem to work.
You can do it with CSS;
button.ui-datepicker-close {display: none;}
$('<style type="text/css"> .ui-datepicker-close { display: none; } </style>').appendTo("head");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With