-
24 Aug 2009 6:38 AM #1
DatePicker in DateField returns one day less than selected
DatePicker in DateField returns one day less than selected
Hi all!!
I think this is a BUG, anyone knows a workaround?
when I click on a date, for example "Aug 28" in the corresponding field i'm getting "Aug 27", allways the same with Date Fields and DateTime Fields, I've also tryed to use differents DateTimeFormat.
my code:
when I try to read the value with this code:Code:final DateField Fecha = new DateField(); Fecha.setFormatValue(true); Fecha.getPropertyEditor().setFormat(DateTimeFormat.getMediumDateFormat()); Fecha.setFieldLabel("Fecha"); appForm.add(Fecha); final TimeField Inicio = new TimeField(); Inicio.setFieldLabel("Inicio"); appForm.add(Inicio); final TimeField Fin = new TimeField(); Fin.setFieldLabel("Fin"); appForm.add(Fin);
I get the previous date than seleted.Code:Date FechaInicio = Fecha.getValue();
All suggestions are welcome!
Carlos
-
24 Aug 2009 6:43 AM #2
It works without any problems with your sample for me. Also if this is really an issue many more people would have discovered it.
-
24 Aug 2009 6:52 AM #3
maybe it depends something on the timezones?
This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.
GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041
-
24 Aug 2009 7:19 AM #4
I'm using TimeZone -3 GMT for Buenos Aires (Argentina), is that the problem? how can I solve it?
thanks in advance for your help.
Carlos
-
24 Aug 2009 7:29 AM #5
Also works without any problems with that locale for me
-
24 Aug 2009 7:29 AM #6
Sven and Arno.Nyhm, I found out what the problem is.. the problem occurs only with the Hosted Mode, after compiling and test the feature on a regular browser (chrome, FireFox and IE) i've see the problem.
thanks again for your help!
Carlos
-
24 Feb 2011 7:02 AM #7
I have issue like this. When user select some date in DateField with DatePicker, for example 10 Aug 2011 then method DateField.getValue() return 09 Aug 2011 22:00:00, ie it subtracts from the date timezone of user (UTC+2 in this example).
-
8 Mar 2011 1:59 AM #8
Hi,
I have the same issue. I don't know how to fix it...
It appears only on certain dates (ie 20/02/1932 -> 19/02/1932 whereas 20/02/1998 -> 20/02/1998)
Any help?
-
27 Oct 2011 3:32 AM #9
daylight saving time bug
daylight saving time bug
I've found that this issue is due to windows (in my case) self adjustment to daylight saving time (horário de verão in portuguese) witch here in Brazil represents one hour ahead. If we turn off windows self adjustment to daylight saving, than it works again.
The question is I have just found it and I am still working in a solution.
-
27 Oct 2011 4:54 AM #10


Reply With Quote