Maharudra Gadekar

Maharudra Gadekar

  • 1.1k
  • 367
  • 82.1k

how to avoid date format issue in jquery in mvc?

Nov 22 2016 8:44 AM
Hi,
 
 i am using jquery date picker and save date but after select date 12 date(15/11/2016) then show validation error........
 
show below code of jquery
$(function () {
$("#stdfrm_birthdate").datepicker({
dateFormat: "dd/mm/yy",
showOn: "button",
// buttonImage: "../Images/calendar1.gif",
buttonHeight: "10px",
buttonwidth: "10px",
changeMonth: true,
changeYear: true,
buttonImageOnly: true,
buttonText: "Select date",
showAnim: "slide",
maxDate: 0,
yearRange: "-60:+0"
});
}); 
 
 
 
and  below textbox code
 
@Html.EditorFor(model => model.stdfrm_birthdate,, new { htmlAttributes = new { placeholder = "dd/mm/yy" } })
@Html.ValidationMessageFor(modelitem => modelitem.stdfrm_birthdate, "", new { @class = "text-danger" }) 
 
how to resolved
 
help me please,
 
thank in advance

Answers (2)