Thursday, October 27, 2016

Disable Future And Past Date of jQuery Calendar In ASP.NET MVC

$(document).ready(function() { 
    $("#EnterDate").datepicker({ 
        dateFormat:"dd-mm-yy"
        minDate: -0, 
        maxDate: "+0M +0D" 
 
    }); 
});

 ---------------------
 Now let us change the maxDate property to enable only five days from current date
$(document).ready(function() {  
    $("#EnterDate").datepicker({  
        dateFormat:"dd-mm-yy"
        minDate: -0,  
        maxDate: "+0M +4D"  
  
    });  
}); 

Confirm Alert Box on ActionLink Click in ASP.NET MVC

@Html.ActionLink("Delete", "DeleteEmp", new { id = item.Empid },

new { onclick = "return confirm('Are sure wants to delete?');" })
EDMX--ntity Data Model XML