tr:inputDate
Hi, I am using the trinidad component tr:inputDate, and dont know if im doing something completely stupid. Whenever i click on the popup, it appears ok. I also have a tr:validateDateRange element with it, which takes the limit from a managed bean through some el. If, for example, i set the minimum date to be 15/09/2007 (dd/MM/) in the managed bean, whenever i click on the date picker icon, it brings up the popup ok, but i am not able to select the minimum date, and also if i click the first available date (in this case 16/09/2007), it populates the field with 15/09/2007. As you can imagine its been a source of frustration. Any ideas - ive been googling for hours with little success Regards, Andy
Re: tr:inputDate
just double checked there- i am using java.util.Date... Regards, Andy - Original Message From: Leonardo Uribe <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Sunday, 16 September, 2007 12:00:19 AM Subject: Re: tr:inputDate and also if i click the first available date (in this case 16/09/2007), it populates the field with 15/09/2007. I remember this issue. Are you using java.sql.Date as the type for the property in the bean? I just changed it for java.util.Date and all works well for me. Regards Leonardo Uribe
Re: tr:inputDate
It also happens with the live demos, which is weird... - Original Message From: Leonardo Uribe <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Sunday, 16 September, 2007 12:00:19 AM Subject: Re: tr:inputDate and also if i click the first available date (in this case 16/09/2007), it populates the field with 15/09/2007. I remember this issue. Are you using java.sql.Date as the type for the property in the bean? I just changed it for java.util.Date and all works well for me. Regards Leonardo Uribe
Re: tr:inputDate on live demo
Hi, I have done some more investigation with my problem on the live demo, and have tested with several browsers. It seems that whenever you have an empty field for the inputDate, and select the date popup, it sets it correctly. However, if a date is there, and the popup is selected, any date chosen in the popup date will be disregarded and the day before taken as the selected value. Have i missed something really simple here? This seems like quite a fundamental problem. Regards, Andrew - Original Message From: Leonardo Uribe <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Sunday, 16 September, 2007 12:00:19 AM Subject: Re: tr:inputDate and also if i click the first available date (in this case 16/09/2007), it populates the field with 15/09/2007. I remember this issue. Are you using java.sql.Date as the type for the property in the bean? I just changed it for java.util.Date and all works well for me. Regards Leonardo Uribe
Re: tr:inputDate
Hi, Sounds like that could be it -seeing as it affects all instances. Not to sound too stupid, but i take it that this can be addressed by applying a timezone object to the inputDate through the use of the convertDateTime tag? Regards, Andrew - Original Message From: Simon Lessard <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Sunday, 16 September, 2007 4:36:45 PM Subject: Re: tr:inputDate My hunch would be the timezone setting. I don't have access to SVN and source right now to check, but if the TimeZone use the 3-char format (i.e. EST or PST), then daylight saving is ignored (and we're currently under daylight saving), resulting in hour hour lost. Since we set the date using midnight (0:00:00,000), losing 1 hours means going back one day. I plan to check out on that while fixing the first day of week issue to see if there's a way to prevent such issues. Regards, ~ Simon On 9/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: It also happens with the live demos, which is weird... - Original Message From: Leonardo Uribe < [EMAIL PROTECTED]> To: MyFaces Discussion Sent: Sunday, 16 September, 2007 12:00:19 AM Subject: Re: tr:inputDate and also if i click the first available date (in this case 16/09/2007), it populates the field with 15/09/2007. I remember this issue. Are you using java.sql.Date as the type for the property in the bean? I just changed it for java.util.Date and all works well for me. Regards Leonardo Uribe
Re: tr:inputDate
Hi again. I did some more investigation into this, and it seems that whenever you pick a date after the end of october, when daylight savings time switches, the date picker is ok. All very confusing. Should i be setting my default timezone to be GMT or a different one, like Europe/London? Andy - Original Message From: Adam Winer <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Sunday, 16 September, 2007 7:57:24 PM Subject: Re: tr:inputDate I still strongly suspect this is a daylight savings time issue, or at least a time zone issue, where one part of the system is interpreting the date with one time zone, and another part of the system is doing so with a different time zone. Because of how java.util.Date is misdesigned, that means that something entered as midnight of 16/09/2007 can end up as 23:00 of 15/09/2007 when re-displayed. -- Adam On 9/16/07, Simon Lessard <[EMAIL PROTECTED]> wrote: > I just checked demo files and we don't use a TimeZone setting in > trinidad-config.xml, so my hunch wasn't good. > > > On 9/16/07, Simon Lessard < [EMAIL PROTECTED]> wrote: > > If that's the sole issue, then yes it should fix it. > > > > > > > > On 9/16/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi, > > > > > > Sounds like that could be it -seeing as it affects all instances. > > > Not to sound too stupid, but i take it that this can be addressed by > applying a timezone object to the inputDate through the use of the > convertDateTime tag? > > > > > > Regards, > > > Andrew > > > > > > > > > - Original Message > > > From: Simon Lessard < [EMAIL PROTECTED]> > > > To: MyFaces Discussion > > > > > > Sent: Sunday, 16 September, 2007 4:36:45 PM > > > Subject: Re: tr:inputDate > > > > > > My hunch would be the timezone setting. I don't have access to SVN and > source right now to check, but if the TimeZone use the 3-char format ( i.e. > EST or PST), then daylight saving is ignored (and we're currently under > daylight saving), resulting in hour hour lost. Since we set the date using > midnight (0:00:00,000), losing 1 hours means going back one day. > > > > > > I plan to check out on that while fixing the first day of week issue to > see if there's a way to prevent such issues. > > > > > > > > > Regards, > > > > > > ~ Simon > > > > > > > > > On 9/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > It also happens with the live demos, which is weird... > > > > > > > > > > > > - Original Message > > > > From: Leonardo Uribe < [EMAIL PROTECTED]> > > > > To: MyFaces Discussion > > > > Sent: Sunday, 16 September, 2007 12:00:19 AM > > > > Subject: Re: tr:inputDate > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and also if i click the first available date (in this case > 16/09/2007), it populates the field with 15/09/2007. > > > > > > > > > > > > > I remember this issue. Are you using java.sql.Date as the type for the > property in the bean? I just changed it for java.util.Date and > > > > all works well for me. > > > > > > > > Regards > > > > > > > > Leonardo Uribe > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: tr:inputDate
Hi Martin, The problem seems to be a fundamental bug in the way that daylight savings is calculated. Whenever you select a day in the date picker, it seems to select the previous day. This happens on the live demos, which is defaulted to GMT, as there is no default in trinidad-config.xml. This then affects validation of the date. If we take the example where the date should have a minimum of todays date. The popup will not allow you to select it, as it calculates that the max day is tomorrow (strangely). I then set the minimum date as today -1. This allows you to then select todays date in the popup, which then selects the previous day. Eg today = 20/09/2007 (dd/MM/). Minimum date = 19/09/2007, popup selected = '20/09/2007' Value returned to text area = 19/09/2007l, which then fails validation - even though the minimum date is set. It seems like a complex problem with the daylights savingwhich i think is coupled with the timezone. Andrew - Original Message From: Martin Marinschek <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Friday, 21 September, 2007 1:34:40 PM Subject: Re: tr:inputDate I didn't read very carefully - but this link might be relevant for the issue. What I remember, we were initially using the system timezone for the f:convertDateTime, but had to change over to using GMT cause else the TCK would fail under certain circumstances. http://mail-archives.apache.org/mod_mbox/myfaces-users/200509.mbox/[EMAIL PROTECTED] regards, Martin On 9/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi again. > I did some more investigation into this, and it seems that whenever you pick > a date after the end of october, when daylight savings time switches, the > date picker is ok. > All very confusing. > Should i be setting my default timezone to be GMT or a different one, like > Europe/London? > > Andy > > > - Original Message > From: Adam Winer <[EMAIL PROTECTED]> > To: MyFaces Discussion > Sent: Sunday, 16 September, 2007 7:57:24 PM > Subject: Re: tr:inputDate > > > I still strongly suspect this is a daylight savings time issue, > or at least a time zone issue, where one part of the system is > interpreting the date with one time zone, and another part > of the system is doing so with a different time zone. > Because of how java.util.Date is misdesigned, that means > that something entered as midnight of 16/09/2007 can > end up as 23:00 of 15/09/2007 when re-displayed. > > -- Adam > > > On 9/16/07, Simon Lessard <[EMAIL PROTECTED]> wrote: > > I just checked demo files and we don't use a TimeZone setting in > > trinidad-config.xml, so my hunch wasn't good. > > > > > > On 9/16/07, Simon Lessard < [EMAIL PROTECTED]> wrote: > > > If that's the sole issue, then yes it should fix it. > > > > > > > > > > > > On 9/16/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > Hi, > > > > > > > > Sounds like that could be it -seeing as it affects all instances. > > > > Not to sound too stupid, but i take it that this can be addressed by > > applying a timezone object to the inputDate through the use of the > > convertDateTime tag? > > > > > > > > Regards, > > > > Andrew > > > > > > > > > > > > - Original Message > > > > From: Simon Lessard < [EMAIL PROTECTED]> > > > > To: MyFaces Discussion > > > > > > > > Sent: Sunday, 16 September, 2007 4:36:45 PM > > > > Subject: Re: tr:inputDate > > > > > > > > My hunch would be the timezone setting. I don't have access to SVN and > > source right now to check, but if the TimeZone use the 3-char format ( > i.e. > > EST or PST), then daylight saving is ignored (and we're currently under > > daylight saving), resulting in hour hour lost. Since we set the date using > > midnight (0:00:00,000), losing 1 hours means going back one day. > > > > > > > > I plan to check out on that while fixing the first day of week issue > to > > see if there's a way to prevent such issues. > > > > > > > > > > > > Regards, > > > > > > > > ~ Simon > > > > > > > > > > > > On 9/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > > > > > It also happens with the live demos, which is weird... > > > > > > > > > > > > > > > - Original Message > > > > > From: Leonardo Uribe < [EMAIL PROTECTED]> > > > > > To: MyFaces Discussion > > > > > Sent: Sunday, 16 September, 2007 12:00:19 AM > > > > > Subject: Re: tr:inputDate > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and also if i click the first available date (in this case > > 16/09/2007), it populates the field with 15/09/2007. > > > > > > > > > > > > > > > > I remember this issue. Are you using java.sql.Date as the type for > the > > property in the bean? I just changed it for java.util.Date and > > > > > all works well for me. > > > > > > > > > > Regards > > > > > > > > > > Leonardo Uribe > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Re: tr:inputDate
In another cruel twist of fate, the date popup seems to work from 1st November onwards. That means that there is no way to select 31st October, as the 1st Nov selects the correct date, but selecting the 31st October will select the 30th October. - Original Message From: Martin Marinschek <[EMAIL PROTECTED]> To: MyFaces Discussion Sent: Friday, 21 September, 2007 1:34:40 PM Subject: Re: tr:inputDate I didn't read very carefully - but this link might be relevant for the issue. What I remember, we were initially using the system timezone for the f:convertDateTime, but had to change over to using GMT cause else the TCK would fail under certain circumstances. http://mail-archives.apache.org/mod_mbox/myfaces-users/200509.mbox/[EMAIL PROTECTED] regards, Martin On 9/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi again. > I did some more investigation into this, and it seems that whenever you pick > a date after the end of october, when daylight savings time switches, the > date picker is ok. > All very confusing. > Should i be setting my default timezone to be GMT or a different one, like > Europe/London? > > Andy > > > - Original Message > From: Adam Winer <[EMAIL PROTECTED]> > To: MyFaces Discussion > Sent: Sunday, 16 September, 2007 7:57:24 PM > Subject: Re: tr:inputDate > > > I still strongly suspect this is a daylight savings time issue, > or at least a time zone issue, where one part of the system is > interpreting the date with one time zone, and another part > of the system is doing so with a different time zone. > Because of how java.util.Date is misdesigned, that means > that something entered as midnight of 16/09/2007 can > end up as 23:00 of 15/09/2007 when re-displayed. > > -- Adam > > > On 9/16/07, Simon Lessard <[EMAIL PROTECTED]> wrote: > > I just checked demo files and we don't use a TimeZone setting in > > trinidad-config.xml, so my hunch wasn't good. > > > > > > On 9/16/07, Simon Lessard < [EMAIL PROTECTED]> wrote: > > > If that's the sole issue, then yes it should fix it. > > > > > > > > > > > > On 9/16/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > Hi, > > > > > > > > Sounds like that could be it -seeing as it affects all instances. > > > > Not to sound too stupid, but i take it that this can be addressed by > > applying a timezone object to the inputDate through the use of the > > convertDateTime tag? > > > > > > > > Regards, > > > > Andrew > > > > > > > > > > > > - Original Message > > > > From: Simon Lessard < [EMAIL PROTECTED]> > > > > To: MyFaces Discussion > > > > > > > > Sent: Sunday, 16 September, 2007 4:36:45 PM > > > > Subject: Re: tr:inputDate > > > > > > > > My hunch would be the timezone setting. I don't have access to SVN and > > source right now to check, but if the TimeZone use the 3-char format ( > i.e. > > EST or PST), then daylight saving is ignored (and we're currently under > > daylight saving), resulting in hour hour lost. Since we set the date using > > midnight (0:00:00,000), losing 1 hours means going back one day. > > > > > > > > I plan to check out on that while fixing the first day of week issue > to > > see if there's a way to prevent such issues. > > > > > > > > > > > > Regards, > > > > > > > > ~ Simon > > > > > > > > > > > > On 9/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > > > > > > > > > > > > > > > > It also happens with the live demos, which is weird... > > > > > > > > > > > > > > > - Original Message > > > > > From: Leonardo Uribe < [EMAIL PROTECTED]> > > > > > To: MyFaces Discussion > > > > > Sent: Sunday, 16 September, 2007 12:00:19 AM > > > > > Subject: Re: tr:inputDate > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and also if i click the first available date (in this case > > 16/09/2007), it populates the field with 15/09/2007. > > > > > > > > > > > > > > > > I remember this issue. Are you using java.sql.Date as the type for > the > > property in the bean? I just changed it for java.util.Date and > > > > > all works well for me. > > > > > > > > > > Regards > > > > > > > > > > Leonardo Uribe > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces