Ist es möglich, Daten in dd/mm/yyyy
Format auszugeben? Ich brauche es in diesem kurzen Format, um es mit meiner Datenbank kompatibel zu machen.Javascript Datum Ausgabe
var date = new Date();
// add 8 months
date.setMonth(date.getMonth() + 1);
document.getElementById('theDate').value = date;
// check if it is a saturday
if(date.getDay() == 6)
{
// if it is then add two days
date.setDate(date.getDate() + 2);
}
if(date.getDay() == 0)
{
// if it is then add one days
date.setDate(date.getDate() + 1);
}
document.getElementById('theDate').value = date;
<input type="text" id="theDate" name="taksittarih1" class="form-control">
Kommentar: 8 Monate hinzufügen. Code: Fügt 1 Monat hinzu. Klingt plausibel. –
es tut mir leid, ich repariere es zu kommentieren –