PDA

View Full Version : [INFOREQ] Problem with saving date in proper format in Sencha Touch v 2.0.0.1



KoSik
25 Oct 2012, 5:01 AM
In Ext.data.writer.Writer method writeDate should be modified.

Not it is:


writeDate: function(field, date) {
var dateFormat = field.dateFormat || 'timestamp';
switch (dateFormat) {
case 'timestamp':
return date.getTime()/1000;
case 'time':
return date.getTime();
default:
return Ext.Date.format(date, dateFormat);
}
},

Should be:


writeDate: function(field, date) {
var dateFormat = field.getDateFormat() || 'timestamp';
switch (dateFormat) {
case 'timestamp':
return date.getTime()/1000;
case 'time':
return date.getTime();
default:
return Ext.Date.format(date, dateFormat);
}
},

Problem is that field.dateFormat always returns "undefined";

mitchellsimoens
25 Oct 2012, 5:12 AM
Have you tried a recent release?

KoSik
25 Oct 2012, 5:58 AM
Sorry for incorrect title of this bug. This bug is in latest release available for download - 2.0.1.1

mitchellsimoens
25 Oct 2012, 6:00 AM
http://www.sencha.com/forum/announcement.php?f=92&a=36

KoSik
25 Oct 2012, 7:35 AM
It looks like new Sencha CMD v3 doesn't work well with update feature. I guess, that updating SDK manually may cause problems:

This is what I get when try to update SDK to 2.1.0-RC2 version:


Sencha Cmd v3.0.0.190
[INFO ] init-properties:
[INFO ] init-sencha-command:
[INFO ] init:
[INFO ] -before-app-upgrade:
[INFO ] app-upgrade-impl:
[ERROR] file /Users/yurevichcv/bin/Sencha/Cmd/3.0.0.190/plugins/touch/current/${framework.config.dir}/app-upgrade.js not found.