javascript - how to resolve date picker format in mvc5 -
im working in mvc5 entity framework. here fields have date fields need set data format. here using script , datepicker. got problem if set after date of 12. got error "enter valid date"
script used in views:-
$('#datepick').datepicker({ dateformat: 'dd/mm/yy', mindate: 0 });
code used in views
<div class="row form-group"> <div class="col-md-4"> due date: </div> <div class="col-md-8"> @html.textboxfor(model => model.goodreceipt.due_date, new { @value = datetime.now.tostring("mm/dd/yyyy"), @class = "form-control control-text ", @id = "datepick" }) @*@html.validationmessagefor(model => model.goodreceipt.due_date)*@ </div> </div>
i got error this"enter valid date" date must in 12, after 12 (i.e 13-12-2014) error occur onlyii comment validation message here got error.
here want finish task.
i guess there different format of date..need change below , try again :-
$('#datepick').datepicker({ dateformat: 'mm/dd/yyyy', mindate: 0 });
Comments
Post a Comment