break the date string first then take the month as an integer.example.Compare with 12. If it is greater than 12 then it must be a date, not a month. Then just change the format as per your needSee how to change the date formathttps://www.codespeedy.com/format-javascript-date-to-yyyy-mm-dd/ But in y...