I have a small problem setting the correct dates on my datepickers. Somehow the date shown in the textbox are not the correct one in the datepicker.
Code textboxes:
<div class="small-12 medium-6 large-3 columns">
@Html.Label("Departure Date:", new { @class = "label-travel" })
@Html.TextBoxFor(m => m.DepartureDate, new { Value = Model.DepartureDate.ToShortDateString(), @class = "textbox", @id = "departureDate" })
</div>
<div class="small-12 medium-6 large-3 columns">
@Html.Label("Return Date:", new { @class = "label-travel" })
@Html.TextBoxFor(m => m.ReturnDate, new { Value = Model.ReturnDate.ToShortDateString(), @class = "textbox", @id = "returnDate" })
</div>
var currentDay = ??
var currentDayPlusOne = ??
$("#departureDate").datepicker({
dateformat: "yy-dd-mm"
});
$("#returnDate").datepicker({
dateformat: "yy-dd-mm"
});
What should I write in order to set the current days in my datepicker, so the textbox has the date 2015-26-15 and the other day is 2015-27-15?
Hope someone can show me.