how to make a wound on the calendar date?
come fare una ferita alla data del calendario?

come fare una ferita alla data del calendario?
What do you mean a "wound"?
And if you want to compare dates on the frontend, CF uses the moment.js libray.
And if you want to compare dates on the frontend, CF uses the moment.js libray.
Thanks for the reply
"wound"error of the translation sorry
I created a forum where the user enters a date from the calendar
if data is included between 12/22/2019 and 12/28/2019 a Var ts has a value of 10 else 5
I hope I was able to explain myself
"wound"error of the translation sorry
I created a forum where the user enters a date from the calendar
if data is included between 12/22/2019 and 12/28/2019 a Var ts has a value of 10 else 5
I hope I was able to explain myself
jQuery(document).on('change', 'input[name="calendar_name"]', function() {
let date = jQuery(this).val();
if(moment(date).isBetween('2019-12-22', '2019-12-28')) {
// Do whatever it is you're doing here
}
}
jQuery(document).on('change', 'input[name="calendar22"]', function() {does not work
let date = jQuery(this).val();
if(moment(date).isBetween('22-12-2019', '28-12-2019')) {
var ts = 2.50;
}else{
var ts = 5.00;
}
});
op("#tipologia_biglietto").change(function (tipo) {
if (op("#tipologia_biglietto").val () == "Andata & ritorno") {
op('#biglietto').val ('Andata & ritorno');
op('#tassa_di_sbarco').val (ts);
}
else if (op("#tipologia_biglietto").val () == "Solo Andata"){
op('#biglietto').val ('Solo Andata');
op('#tassa_di_sbarco').val (ts);
}
else
{
op('#biglietto').val ('Solo Ritorno');
op('#tassa_di_sbarco').val ('0');
}
}
);
Of course not those values are only available there you should do all your functions inside it, and it should also be inside a JavaScript block with the Dom ready option ticked
This topic is locked and no more replies can be posted.