DateComboBox timezone

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 10:32 am

Is there a way to specify the timezone of the DateComboBox? If I use a DateFormat and Date with a timezone different than the one I'm currently in then the current day's selection in the calendar (red bordered day) may be incorrect (seems to use the system default timezone). I'd like to suggest this feature if it doesn't already exist.
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 10:47 am

I described the problem incorrectly.. It's not the current day (red-bordered day) that is the problem, it's that when you select another day in the calendar chooser the black-bordered box may end up selecting the wrong day.

Also, I tried setting the timezone on the DateModel, but it didn't seem to do anything to fix the above problem.
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby JIDE Support » Mon Feb 07, 2011 11:09 am

Tried JIDE DateComboBoxDemo in the latest release but could not notice the issue. As long as DateModel#setTimeZone() is invoked, DateComboBox#getSelectedItem() will return a Calendar instance with the setting time zone. The DateComboBox itself displays the date whatever is selected in the date chooser panel. Can you please create a test case to demonstrate the issue?

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 11:24 am

Thanks for the reply and sorry, I could have given some more details. My timezone is PST, but I want to use the DateComboBox to select GMT dates/times.

In code, I set the timezone as such: myDateComboBox.getDateModel().setTimeZone(GMT). I also use a GMT date formatter: myDateComboBox.setFormat(GMT_FORMAT);

Then, in the UI, do the following:
- select today's date in the calendar chooser
- set the time to 00:00:00 and click the calendar chooser days, you'll see that the black box highlights the day you've selected
- set the time to something > 08:00:00 (PST is GMT+8) and click the calendar chooser days, you'll see that the black box highlights the day following the one you've selected. This seems like a bug or perhaps I've misconfigured the DateComboBox.
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby JIDE Support » Mon Feb 07, 2011 11:31 am

Attached is the test case I used. Can you please give it a try?

Thanks,
Attachments
DateComboBoxDemo.java
(14.99 KiB) Downloaded 2140 times
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 11:39 am

can you send the AbstractDemo class as well?
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 11:44 am

I copied the demo code where it creates the DateComboBox and I still see the same problem. I'm using jide-grids version 2.8.5, perhaps that could be the problem...
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby JIDE Support » Mon Feb 07, 2011 11:50 am

Attached is the modified stand-alone test case with no need for AbstractDemo. The AbstractDemo class could be downloaded from http://www.jidesoft.com/downloads for your future reference.

Thanks,
Attachments
DateComboBoxDemo.java
(14.53 KiB) Downloaded 2152 times
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 1:31 pm

I get the same error. Try running the DateComboBox demo version I attached. Depending on your timezone, you should see the issue if you play with the time field and then select days in the calendar chooser. For me in PST, if I set the time to 8:00AM, and click days in the calendar chooser, the black box indicating the selected day highlights the wrong day (if I select times < 8:00AM, the black box highlights the correct day when I click around the chooser).
Attachments
DateComboBoxDemo.java
(3.92 KiB) Downloaded 2090 times
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby JIDE Support » Mon Feb 07, 2011 1:55 pm

Thanks for test case. We reproduced it. Will try to find a solution and let you know when we have any progress.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby dsmain » Mon Feb 07, 2011 2:15 pm

Thanks for verifying that. For the time being I can work around this by using your component as a local time chooser and converting to and from GMT, but it's not so elegant :)
dsmain
 
Posts: 7
Joined: Mon Feb 07, 2011 10:25 am

Re: DateComboBox timezone

Postby JIDE Support » Mon Feb 21, 2011 5:36 pm

Just so you know, this is fixed in 2.11.1 just released.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby rais_rishabh » Thu Apr 12, 2012 11:01 am

Hello, I can not download the AbstractDemo code, which is prohibiting me from compiling the demo in my IDE. Can you please help?
rais_rishabh
 
Posts: 7
Joined: Thu Mar 01, 2012 2:34 pm

Re: DateComboBox timezone

Postby JIDE Support » Thu Apr 12, 2012 11:17 am

Please download the evaluation package at http://www.jidesoft.com/evaluation/index.php to get the demo source code.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby rais_rishabh » Thu Apr 12, 2012 11:45 am

Thanks. I already have that evaluation package, but I could not find the code for AbstractDemo, which is required to compile pretty much anything without making any changes. I have been manipulating the code using my own classes and interfaces to work, but it will be nice to have the code run without making any changes.
Thanks once again for your prompt reply.
rais_rishabh
 
Posts: 7
Joined: Thu Mar 01, 2012 2:34 pm

Re: DateComboBox timezone

Postby JIDE Support » Thu Apr 12, 2012 12:00 pm

After you unzip the evaluate package, you should be able to see an Example folder, all demo classes including AbstractDemo are in that folder.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DateComboBox timezone

Postby rais_rishabh » Thu Apr 12, 2012 12:33 pm

Got it. Thanks very much! This is great.
rais_rishabh
 
Posts: 7
Joined: Thu Mar 01, 2012 2:34 pm


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 16 guests

cron