Hybrid View
-
19 Nov 2007 4:05 AM #1
DateField: I picked up 11/29/2007, but field receive 28/11/2007
DateField: I picked up 11/29/2007, but field receive 28/11/2007
Hi,
I have some datefields and when I click at any november day (year 2007), the field is filled with a date with one day before.
What can be?
Code:
Code:new Ext.form.DateField({ fieldLabel: 'Data', name: 'Atendente.DataAfastamento', width: 120, allowBlank: false })
-
19 Nov 2007 6:36 AM #2
daviscabral,
this problem was discuted before in this forum, but they never can simulate it.
[I]Este problema j
-
19 Nov 2007 6:48 AM #3
are you using any of the l8n files?
(see this thread for more info: http://extjs.com/forum/showthread.php?t=14686)
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
19 Nov 2007 7:26 AM #4
Mystix,
I think it is not the problem... Because we get the same on the docs exemples too.
Look at this topics:
http://extjs.com/forum/showthread.php?t=18461
http://extjs.com/forum/showthread.php?p=67018
http://extjs.com/forum/showthread.php?t=15247 (this is mine, witch i could not explain because my poor english)
I think the problem is on these lines of the DatePicker.js file:
(...)
523 var day = 86400000;
524 var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime();
525 var today = new Date().clearTime().getTime();
526 var sel = date.clearTime().getTime();
(...)
in especial with the function clearTime (where is it declared?)
-
19 Nov 2007 8:13 AM #5
clearTime is declared in Date.js.
all it does is to clear any time values from a js Date object.
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
19 Nov 2007 9:00 AM #6
Mystix,
I saw it...
I think it is a firefox bug, because if we execute alert(new Date()) we get something like Sun Oct 14 2007 14:49:34 GMT-0200, but when execute alert(new Date( (new Date()).setHours(0) )) we get Sat Oct 13 2007 23:50:30 GMT-0300 (Hora oficial do Brasil)...
i tryed to overhide this function (clearTime) to avoid it, but without sucess...
obs.: i set up my system date to 10/14/2007




Reply With Quote