ralfius
20 Nov 2012, 1:49 AM
Hello,
looks like I have found some kind of bug in Ext.form.field.Date behavior in ExtJS 4.1.2. I have a datefield:
Ext.define('MyDateField', {
extend: 'Ext.form.field.Date',
alias: 'widget.myDateField',
format: 'm/d/Y',
maskRe: /[0-9\/: ]/,
enforceMaxLength: true,
maxLength: 16
});
When I'm trying to set value of this datefield using setValue() method, if the Date object is having some time different from 00:00:00, it makes datefield's time 00:00:00 with the same date and timezone.
Example: if use datefield.setValue(new Date("Wed Dec 07 1960 23:00:00 GMT+0200 (FLE Standard Time)"), after that datefield.getValue() returns Wed Dec 07 1960 00:00:00 GMT+0200 (FLE Standard Time). Could you please give some solution for this problem?
Thanks
looks like I have found some kind of bug in Ext.form.field.Date behavior in ExtJS 4.1.2. I have a datefield:
Ext.define('MyDateField', {
extend: 'Ext.form.field.Date',
alias: 'widget.myDateField',
format: 'm/d/Y',
maskRe: /[0-9\/: ]/,
enforceMaxLength: true,
maxLength: 16
});
When I'm trying to set value of this datefield using setValue() method, if the Date object is having some time different from 00:00:00, it makes datefield's time 00:00:00 with the same date and timezone.
Example: if use datefield.setValue(new Date("Wed Dec 07 1960 23:00:00 GMT+0200 (FLE Standard Time)"), after that datefield.getValue() returns Wed Dec 07 1960 00:00:00 GMT+0200 (FLE Standard Time). Could you please give some solution for this problem?
Thanks