my function returns the selected date of a calendar in this format:
var returnValue = "6.7.2017"; //day.month.year
When i try to use it for a new Date, it does not work:
var weekdays = ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'];
var wkdayname = new Date(returnValue); //Error: returnValue ist NaN
var dayName = weekdays[wkdayname.getDay()];
All I want is just the name of the weekday of this date.
Do you have any suggestions ?