Check if a date within in range
问题 I am trying to check if a date of format mm.dd.yyyy is greater than today and less than the date after 6 months from today. Here is my code: var isLinkExpiryDateWithinRange = function(value) { var monthfield = value.split('.')[0]; var dayfield = value.split('.')[1]; var yearfield = value.split('.')[2]; var inputDate = new Date(yearfield, monthfield - 1, dayfield); var today = new Date(); today = new Date(today.getFullYear(), today.getMonth(), today.getDate()); alert(inputDate > today);//alert