DHTMLX Scheduler无法加载数据,即使该数据在model.layers
文档中是内联的也是如此。
这是我的代码:
layers = model.layers
layers[0].trainable = False
在这里查看小提琴:
https://jsfiddle.net/q9bhgj0s/
我想念什么?
谢谢!
答案 0 :(得分:1)
The events you've passed to the scheduler's parse method are not rendering because the date format specified for the start_date and end_date properties is not being recognised.
The following demonstrates the parse function using an acceptable format:
scheduler.parse([
{text:"Meeting", start_date:"2019-01-15 14:00", end_date:"2019-01-15 17:00"},
{text:"Conference", start_date:"2019-01-16 12:00", end_date:"2019-01-16 19:00"},
{text:"Interview", start_date:"2019-01-17 09:00", end_date:"2019-01-17 10:00"}
], "json");
Updated Fiddle: https://jsfiddle.net/ChrisCookDev/frwynpds/
In addition, please bear in mind that the scheduler's parse method does not return a Boolean result (as your code suggests with the reporting of "OK" and "NOK"):
void parse(object data, [string type] );
答案 1 :(得分:0)
作为替代解决方案,您可以根据数据中的日期格式更改xml_date配置的值:
scheduler.config.xml_date="%d/%m/%Y %H:%i";
答案 2 :(得分:0)
默认情况下,调度程序将"start_date"
和"end_date"
的日期设置为下一种格式:"mm/dd/yyy H:i"
,因此将您在该段中的日期更改为:"start_date:"01/15/2020 14:00",
end_date:"01/15/2020 17:00"",
或为您的调度程序设置格式日期:scheduler.config.xml_date="%Y-%m-%d %H:%i";
,并以此格式通过日期。