For reinitialize full calendar apply this code:
$('#datepicker').datepicker({ //Your desired options });
Fetch data from db and to display it on fullcalendar
<script type="text/javascript"> $(function () { $("#datepicker").datepicker({ format: "dd/mm/yy", showOtherMonths: true, selectOtherMonths: true }); }); var array = ["2018-11-11","2018-11-12","2018-11-13","2018-11-14","2018-11-15","2018-11-16","2018-11-17"]; // fetch mysql data here $('#datepicker').datepicker({ beforeShowDay: function(date){ var string = jQuery.datepicker.formatDate('yy-mm-dd', date); return [ array.indexOf(string) == -1 ] } }); </script>
Question and answer is powered by AnsPress.io