IE 11 Javascript Object doesnt support property or method 'match' -
its javascript countdown working on firefox & chrome not working on ie 11. here code
return this.each(function() { // convert if(!(todate instanceof date)) { if(string(todate).match(/^[0-9]*$/)) { todate = new date(todate); } else if( todate.match(/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{2,4})\s([0-9]{1,2})\:([0-9]{2})\:([0-9]{2})/) || todate.match(/([0-9]{2,4})\/([0-9]{1,2})\/([0-9]{1,2})\s([0-9]{1,2})\:([0-9]{2})\:([0-9]{2})/) ) { todate = new date(todate); } else if(todate.match(/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{2,4})/) || todate.match(/([0-9]{2,4})\/([0-9]{1,2})\/([0-9]{1,2})/) ) { todate = new date(todate) } else { throw new error("doesn't seen valid date object or string") } }
Comments
Post a Comment