I'm using an Input field (datetime-local).
In order to change the weekday in another field I've added following custom code (oninput).
Unfortunately it's not possible to select the date / time per calendar pop-up anymore - it's only possible to fill in the date and time directly into the field.
Does anyone know how to change the custom code to enable the calendar pop-up widget again?
Thanks in adavance
BR, Oli
Code: Select all
if(nuIsNewRecord()){
// Set Value in field kal_saison
var startdatum = $("#kal_startzeit").val();
var monat = startdatum.substr(5, 2);
var jahr = startdatum.substr(0, 4);
if(monat>7){
var saison = jahr + "/" + parseInt(parseInt(jahr) + 1);
}else{
var saison = parseInt(parseInt(jahr) - 1) + "/" + jahr;
}
$('#kal_saison').val(saison).change();
}
// Get the day of the week based on the selected date
var startzeit = $("#kal_startzeit").val();
wochentag = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
var day = new Date(startzeit).getDay();
var tag = wochentag[day];
$('#kal_wochentag').val(tag).change();
// Set field kal_endezeit based on kal_startzeit
$('#kal_endezeit').val(startzeit).change();