In my program, I have implemented multidatespicker (http://multidatespickr.sourceforge.net/) for my solution. I have an attribute called DatesDispo
to receive my dates picked from my calendar.
public List<DateTime> DatesDispo { get; set; }
In my razor view, I have an input for my calendar:
<div class="form-group">
@Html.LabelFor(model => model.DatesDispo, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<input name="DatesDispo" id="DatesDispo"></input>
</div>
</div>
I see my calendar and until there it's working. But on post of the form, I don't receive my dates that I picked in my DateDispo
field. In debug mode, I had tested this and it worked but maybe I changed something and now I'm unable to bind dates picked with my date field. Someone know why? I swear that I had picked 2 dates and my list of dates had a count = 2.
Edited: Data received from post => https://gyazo.com/629a7f01c6802b2cefc825d786b2470b
__RequestVerificationToken=FG381kMw0ANq_vV0ucoFr7Rrn6J1nqZNptlSy9JtT27JUggqOvru9QFkPZP40QniZ_ZBtpBNzMN00MZA5Aq06ZByz3yAz9-YNXpNjMhOG0o1&IdHabilete=7&Adresse=&Ville=&CodePostal=&Pays=&Province=&DateMax=2016-01-26+13%3A42%3A23&DateCreation=2016-01-26+13%3A42%3A23&DatesDispo=01%2F28%2F2016%2C+01%2F29%2F2016&Specifications=System.Collections.Generic.List%601%5BFavornet.Models.Biz.SpecDemande%5D DatesDispo=01%2F28%2F2016%2C+01%2F29%2F2016
DatesDispo
field extracted from above
DatesDispo=01%2F28%2F2016%2C+01%2F29%2F2016