根据所选的下拉列表值禁用自定义日期

时间:2019-06-18 14:59:29

标签: asp.net-mvc

我想根据所选的Dropdownlist值从日历中禁用自定义日期和时间

Tabel1:用户名

Tabel2:时间从-时间到

Dropdownlist1 = //show Username from Tabel1 (Done)
Editor= //show calendar (disable date and time or Highlight it  which is equal Timefrom and Timeto in Tabel2 for the same Uername ) 

我需要帮助

@Html.DropDownList1("Userlist", null, htmlAttributes: new { @class = "form-control" })
@Html.EditorFor(model => model.Schedules.TimeTo, new { htmlAttributes = new { @class = "form-control" } })

控制器

ViewBag.Userlist = new SelectList(dbContext.Users, "Id", "UserName");
ViewBag.Date= new SelectList(data.FuelersSchedules, "Id", "Timefrom");

我希望CalendarEditor禁用日期和时间,或为DropDownList1中选择的用户在Tabel2中突出显示与Timefrom和Timeto相等的日期和时间

0 个答案:

没有答案