i found solution my self by modifying code like this
if (Date.parse(new Date().setHours(0, 0, 0, 0)) > Date.parse($("#EndDate").val())) {
//
}
to avoid time comparison. is there any other better way to do compare dates in efficient manner without any plugin.