I have 3 selects the first select I choose the periodicity that I bring from a table can be bimonthly or biannual the second select I have the months also brought from a table and the third select same contains the months but it is only readonly then at the moment of eleji a periodicality example bimester and I choose the month of January I must fill the field month with the next month depending on the periodicity I am working with laravel javascript and mysql
(document).ready(function () {
let $body = $("body"),
$periodicidad_id = $("#periodicidad_id"),
$fecha = $("#fecha"),
$mes_inicio = $('#mes_inicio'),
$mes_fin = $('#mes_fin'),
$descripcion = $("#descripcion");
$fecha.datepicker({
autoclose: true,
format: "yyyy",
minViewMode: "years",
startDate: "1972"
})
$periodicidad_id.on("change",function () {
var periodo = $periodicidad_id.val();
console.log($periodicidad_id.val());
$.get('/catalogos/periodo-escolar/obtiene_periodo?periodo=' + periodo, function (data) {
$.each(data, function (value) {
})
});
})
$mes_inicio.on("change",function () {
var mes = $mes_inicio.val();
$.get('/catalogos/periodo-escolar/obtiene_mes?mes=' + mes, function (data) {
$.each(data, function (value) {
})
});
})
/* $mes_inicio.o