jeudi 18 mars 2021

jquery if hours and minutes <>

Please, How can I set IF when time is < 21:30 ??

var dt = new Date();
if ((dt.getHours() <= 21) && (dt.getMinutes() <= 30)) { alert("check"); }

This not working when time is example 20:45

Aucun commentaire:

Enregistrer un commentaire