Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353930 - CDateTime miliseconds not editable.
Summary: CDateTime miliseconds not editable.
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Wim Jongman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 14:00 EDT by jing.kerchner CLA
Modified: 2021-07-05 11:40 EDT (History)
2 users (show)

See Also:


Attachments
Fix for bug 353930 (698 bytes, patch)
2012-06-25 13:33 EDT, Doug Sh CLA
wim.jongman: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jing.kerchner CLA 2011-08-04 14:00:57 EDT
Build Identifier: 20090920-1017

When using a CDateTime.setPattern of "HH:mm:ss.SSS", editing the "SSS" for miliseconds does not work. So, if one wants to set a field to ".100", they can't just type ".100" or even "100" in the "SSS" field. Instead, when they do that, they get ".010" and then the cursor jumps to the "HH" field. So, it's very cumbersome to set values to the tenths or hundredths of a second without having to hold down the arrow key to get to the desired number. And no, we can't just use "SS" because we do care about time in the miliseconds. 

Reproducible: Always

Steps to Reproduce:
1.Bring up a CDateTime field with specified pattern of "HH:mm:ss.SSS". 
2.Try to set the time to one tenths of a second. (.100)
3.See that the text gets modified only to .010
Comment 1 Wim Jongman CLA 2011-11-16 16:58:18 EST
(In reply to comment #0)

> And no, we can't just
> use "SS" because we do care about time in the miliseconds.

Do you care enough to provide a patch?
Comment 2 Doug Sh CLA 2012-06-25 12:18:21 EDT
(In reply to comment #1)
> (In reply to comment #0)
> 
> > And no, we can't just
> > use "SS" because we do care about time in the miliseconds.
> 
> Do you care enough to provide a patch?

Not sure exactly how to supply a fix, but the fix for this bug is to add a case statement for Calendar.MILLISECOND in org.eclipse.nebula.widgets.cdatetime.CDateTime.verify(Event).  The case should have digits = 3;
Comment 3 Wim Jongman CLA 2012-06-25 12:47:57 EDT
> 
> Not sure exactly how to supply a fix, but the fix for this bug is to add a case

You can clone the repo on github: 

https://github.com/eclipse/nebula

You can then attach the changed source to this bug (straight up or as a patch). I will make sure to validate and commit the changes and recognize you as the author.
Comment 4 Doug Sh CLA 2012-06-25 13:33:04 EDT
Created attachment 217824 [details]
Fix for bug 353930

Attached is the patch for this bug.  It adds a case for setting the amount of digits in a Calendar.MILLISECOND field.
Comment 7 Wim Jongman CLA 2012-06-26 03:56:03 EDT
Doug, please verify and set to verified if it is ok or else reopen.
Changes can be picked up from our update site in a few moments:

http://www.eclipse.org/nebula/downloads.php
Comment 8 Doug Sh CLA 2012-06-26 15:08:22 EDT
Looks good.  Doesn't look like I have the permissions to change the status to verified.