@using EnVisage.Code @using EnVisage.Code.HtmlHelpers @model EnVisage.Models.VacationModel @{ ViewBag.Title = (Model != null && !Guid.Empty.Equals(Model.Id) ? "Edit " : "Add ") + " Vacation"; var weekEndsStr = string.Empty; foreach (var dateTime in Model.Weekends) { if (!string.IsNullOrEmpty(weekEndsStr)) { weekEndsStr += ","; } weekEndsStr += "'" + dateTime.ToShortDateString() + "'"; } } @section Scripts { }
Make sure you select weekend days for the whole weeks but not only within vacation's date range.