I have a bootstrap-datepicker with the following JS:
$(document).ready(function()
{
var dataIni = $("#calendarioIni");
var dataFim = $("#calendarioFim");
$('#calendarioIni').datepicker({
startDate: '01/01/1998',
endDate: '31/12/1998',
dateFormat: 'dd/mm/yy',
});
$('#calendarioFim').datepicker({
startDate: '01/01/1998',
endDate: '31/12/1998',
dateFormat: 'dd/mm/yy',
});
});
But I will use it on several pages in my project, how could I do code reuse?