I use dhtmlx scheduler with mvc razor. I want to get the inputs for setting start time and endtime with the values from database instead of manually entering 8 and 20 inside the controller,
Do you store these settings(start and end time) in the database table? If so, you can retreive them and assign values to start_hour/end_hour configs.
Note, if you want time selectors in the details form to be limited by this values, you should also add following config:
scheduler.Config.limit_time_select = true;
var unit = new UnitsView("units", "resource_id");
scheduler.Views.Add(unit);
var rooms = new List<object>(){
new { key = "1", label = "resource a"},
new { key = "2", label = "resource b"},
new { key = "3", label = "resource c"},
new { key = "4", label = "resourceS d"},
new { key = "5", label = "resourceS e"}
};
unit.AddOptions(rooms);
scheduler.InitialView = "units";
this was the code initially.
I tried to retrieve the values from sp like this
List<ResourceModel> oresourcemodel = new List<ResourceModel>();
oresourcemodel= _settings.GetResourceOrderdisplay();
//i have no idea what parameters should be passed to unitsview????
var unit = new UnitsView("units", "room_id");
unit.AddOptions(resourcelist);
scheduler.Views.Add(unit);
//i have no idea what parameters should be passed to unitsview???Please guide me.