Hi,
Please i want to ask you about the way to pass datetime format to startdate(like 29-10-2015 10:33:20) and EndDate(like 29-10-2015 11:33:20) attribut of Taskstore.
In this case I can get the duration column by hours if the startdate and endDate have the same day and different hour.
Thanks.
have a good time.
Support Forum
Hello,
Can I pass Datetime to this json data to StartDate for example (2010-01-18 10:30:10) :
Ext.onReady(function(){
var taskStore = Ext.create('Gnt.data.TaskStore', {
autoLoad : true,
proxy : {
type : 'memory',
reader : {
type: 'json'
},
data: [
{
"StartDate" : "2010-01-18",
"EndDate" : "2010-02-02",
"Id" : 1,
"Name" : "Planning",
"expanded" : true,
"children" : [
{
"StartDate" : "2010-01-18",
"EndDate" : "2010-01-26",
"Id" : 2,
"leaf" : true,
"Name" : "Investigate",
"parentId" : 1
},
{
"StartDate" : "2010-01-22",
"EndDate" : "2010-01-25",
"Id" : 3,
"leaf" : true,
"Name" : "Investigate2",
"parentId" : 1
},
{
"StartDate" : "2010-01-28",
"EndDate" : "2010-01-28",
"Id" : 4,
"leaf" : true,
"Name" : "Investigate3",
"parentId" : 1
}
]
}
]
// eof data
}
// eof proxy
});
thanks for your time.
Can I pass Datetime to this json data to StartDate for example (2010-01-18 10:30:10) :
Ext.onReady(function(){
var taskStore = Ext.create('Gnt.data.TaskStore', {
autoLoad : true,
proxy : {
type : 'memory',
reader : {
type: 'json'
},
data: [
{
"StartDate" : "2010-01-18",
"EndDate" : "2010-02-02",
"Id" : 1,
"Name" : "Planning",
"expanded" : true,
"children" : [
{
"StartDate" : "2010-01-18",
"EndDate" : "2010-01-26",
"Id" : 2,
"leaf" : true,
"Name" : "Investigate",
"parentId" : 1
},
{
"StartDate" : "2010-01-22",
"EndDate" : "2010-01-25",
"Id" : 3,
"leaf" : true,
"Name" : "Investigate2",
"parentId" : 1
},
{
"StartDate" : "2010-01-28",
"EndDate" : "2010-01-28",
"Id" : 4,
"leaf" : true,
"Name" : "Investigate3",
"parentId" : 1
}
]
}
]
// eof data
}
// eof proxy
});
thanks for your time.
Yes, you can. Read this doc: https://docs.sencha.com/extjs/5.1/5.1.0- ... dateFormat
By default we use 'c' as date format for StartDate/EndDate fields, feel free to override it if you need.
By default we use 'c' as date format for StartDate/EndDate fields, feel free to override it if you need.