隐藏或禁用 DevExtreme Scheduler 中的编辑属性以及其他问题?
Hide or disable for edit properties in DevExtreme Scheduler and another questions?
我有一个工作调度程序,它处理来自 ajax 调用的 json 数据。我似乎无法在文档中找到的问题是:
- 我如何 "disable" start/end 在编辑弹出窗口中约会并删除
Description
(例如),这样他们就不会是 changeable/visible?我只想编辑日程名称。
- 我怎样才能使调度程序 'focus' 符合来自数据库的特定时间表?我有一个过滤器,其中 returns 只有一个时间表,但如果它不在
current date
中,它就不会显示,我必须手动导航到要查看时间表的日期,是否有选择那个?我认为我可以实现的唯一方法是获取日期并将其设置为 currentDate
属性,但这在某种程度上可能吗?
1) 要自定义预约表格,也请使用 onAppointmentFormCreated event. See this demo。
2) 要将调度程序导航到特定日期,请使用 currentDate option. The sample below shows how to do it using the onContentReady 选项:
$("#scheduler").dxScheduler({
/*...*/
// set default current date too old for demo
currentDate: new Date(2010, 4, 18),
onContentReady: function(e) {
// get all loaded appointments
var appointments = e.component.getDataSource().items();
// navigate to the first appointment
e.component.option("currentDate", new Date(appointments[0].startDate));
}
});
我有一个工作调度程序,它处理来自 ajax 调用的 json 数据。我似乎无法在文档中找到的问题是:
- 我如何 "disable" start/end 在编辑弹出窗口中约会并删除
Description
(例如),这样他们就不会是 changeable/visible?我只想编辑日程名称。 - 我怎样才能使调度程序 'focus' 符合来自数据库的特定时间表?我有一个过滤器,其中 returns 只有一个时间表,但如果它不在
current date
中,它就不会显示,我必须手动导航到要查看时间表的日期,是否有选择那个?我认为我可以实现的唯一方法是获取日期并将其设置为currentDate
属性,但这在某种程度上可能吗?
1) 要自定义预约表格,也请使用 onAppointmentFormCreated event. See this demo。
2) 要将调度程序导航到特定日期,请使用 currentDate option. The sample below shows how to do it using the onContentReady 选项:
$("#scheduler").dxScheduler({
/*...*/
// set default current date too old for demo
currentDate: new Date(2010, 4, 18),
onContentReady: function(e) {
// get all loaded appointments
var appointments = e.component.getDataSource().items();
// navigate to the first appointment
e.component.option("currentDate", new Date(appointments[0].startDate));
}
});