-3
I asked a question a while ago here and they helped me a lot. I managed to make a code searching the day of the week (Saturday and Sunday) and adding a class to the form to disable it. Follow:
jQuery(document).ready(function($) {
now = new Date
var idBotaoEnviar = $("#form-reserva");
now.getDay() == 0 || now.getDay() == 6 || now.getDay(5) && now.getHours() >= 18 ? '' : $(idBotaoEnviar).addClass('ativado')
console.log(now)
});
I needed to add a shape to this code that when it’s Friday after 7:00 pm, it adds the class also to disable the form.
This code above is adding the class every day after 19h.
Can you help me? I really appreciate it. I’m pretty new to what you can see. Thank you!
Okay my friend, thank you very much for your help. I will adjust there and put here the result.
– Rafael Nunes