We are trying to add a ReleaseDate field in the event edit pop-up. But unfortunately when we add this field in the extraItems, the Gantt component does not recognize the date in the correct format. Its interpretation changes according to the web language. What are we doing wrong? In the documentation there is no example (or at least we did not found it) where a case like this is treated.
Thank you in advance.
Support Forum
Hi!
To parse date you could specify your format for your model
https://www.bryntum.com/docs/scheduler/#Common/data/Model
You also could set a desired dateFormat for dateField in event edit.
https://www.bryntum.com/docs/scheduler/#Common/widget/DateField#config-format
To parse date you could specify your format for your model
https://www.bryntum.com/docs/scheduler/#Common/data/Model
class MyModel extends EventModel {
static get fields() {
return [
...
{ name : 'releaseDate', type : 'date' , format : 'YYYY-MM-DD'},
];
}
https://www.bryntum.com/docs/scheduler/#Common/widget/DateField#config-format
features : {
eventEdit : {
extraItems : [
{
type : 'date',
label : 'Release date',
name : 'releaseDate',
format : 'YYYY-MM-DD'
}
]
}
}