Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335948 - DateTime: wrong date if 31.01.2011
Summary: DateTime: wrong date if 31.01.2011
Status: RESOLVED DUPLICATE of bug 315950
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2011-02-01 06:13 EST by Daria Huber CLA
Modified: 2011-02-01 08:38 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daria Huber CLA 2011-02-01 06:13:47 EST
Build Identifier: 

I habe a dateTime widget. I want to read the date from it and show it in the label. It works fine until i select 31.01.2011. My label shows 01.01.2011. I thought my DateTime to String converter is wrong. But it isn't so. DateTime widget delivers already 01.01.2011. Can you help me?

Reproducible: Always
Comment 1 Ivan Furnadjiev CLA 2011-02-01 07:15:26 EST
Which version of RAP are you using? Which style flags are used in widget creation - SWT.CALENDAR, SWT.DATE, SWT.DROP_DOWN? Please specify the exact steps to reproduce it. A snippet will be welcome.
Comment 2 Daria Huber CLA 2011-02-01 07:50:28 EST
RAP Version: 1.3.1 R

Code snippet:
----------------
DateTime dateFrom = new DateTime(composite, SWT.BORDER | SWT.DATE | SWT.DROP_DOWN);
Label label = new Label(composite, "");

addImageLink.addHyperlinkListener(new HyperlinkAdapter() {
     @Override
     public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
            label.setText(dateFrom.getDay() + "." + 
dateFrom.getMonth() + "." + );
     }
Comment 3 Daria Huber CLA 2011-02-01 07:58:09 EST
Sorry, my browser is crashed...
RAP Version: 1.3.1 R
 
Code snippet:
----------------
DateTime dateFrom = new DateTime(composite, SWT.BORDER | SWT.DATE |
SWT.DROP_DOWN);
Label label = new Label(composite, "");
 
addImageLink.addHyperlinkListener(new HyperlinkAdapter() {
     @Override
      public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
             label.setText(dateFrom.getDay() + "." + 
                           dateFrom.getMonth() + "." + 
                           dateFrom.getYear());

Steps to reproduce:
-------------------
1. Select 31.01.2011
2. Click on addImageLink
3. Label shows 01.01.2011
Comment 4 Ivan Furnadjiev CLA 2011-02-01 08:05:39 EST
This bug is a duplicate of bug 315950. The issue has been fixed in 1.4M1.

*** This bug has been marked as a duplicate of bug 315950 ***
Comment 5 Daria Huber CLA 2011-02-01 08:22:53 EST
thanks
Comment 6 Ivan Furnadjiev CLA 2011-02-01 08:38:18 EST
I've attached a patch against 1.3 to bug 315950.

*** This bug has been marked as a duplicate of bug 315950 ***