compare dates in javascript not working -


why below code comparing dates in java script not working.

var fromdate=document.getelementbyid(attendancefromdate_txt).value; alert(fromdate); var val123=document.getelementbyid(attendancetodate_txt).value;  var check = new date(fromdate) ; var check123 = new date(val123) ;  if (check < check123) {     alert("please enter date less date") ; } 

i think miss " " in document.getelementbyid(attendancefromdate_txt).value;

edit it: document.getelementbyid("attendancefromdate_txt").value;


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -