Hi team
As the topic , I am using taskboard .The TaskModel currently has these fields Id name , eventColor, description ,etc . Is it possible to add a default field date?
I think that as a task or event, date is also a necessary property. The same goes for my project.
Support Forum
Hi lanpeng,
Yes, Sure. You can add your own field.
Please check this docs https://bryntum.com/products/taskboard/docs/api/TaskBoard/model/TaskModel#customizing-task-fields
Example:
class MyTask extends TaskModel {
static get fields() {
return [
// Add a new field
{ name: 'date', type : 'date', defaultValue : new Date() }
];
}
...
}
And then set https://bryntum.com/products/taskboard/docs/api/TaskBoard/store/TaskStore#config-modelClass to the custom task model
taskStore : {
modelClass : MyTask
}
All The Best,
Tasnim