Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362181

Summary: selection changed event not fired when canceling the datepicker
Product: z_Archived Reporter: Reto Urfer <reto.urfer>
Component: NebulaAssignee: Wim Jongman <wim.jongman>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: peter
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Reto Urfer CLA 2011-10-27 07:31:32 EDT
Build Identifier: 

In the datepicker every click on a date trigger a selection change event. 

If the date picker is canceled the current date is replaced by the value of the cancelDate attribute but no selection changed event is fired. The result is the model which listens for changes will not be resetted but the display shows the value of the cancelDate => model and display are not consistent!

Reproducible: Always

Steps to Reproduce:
1. open datepicker
2. select a date other than the current selected one
3. click the cancel button in the datepicker
4. display shows the value selected before opening the datepicker but no selection event has been fired
Comment 1 Reto Urfer CLA 2011-10-27 07:38:25 EDT
I could fix the bug locally by adding
   fireSelectionChanged();
after each call of
   setSelection(cancelDate);
in the class CDateTime

Unfortunately i can not add a patch file because i have a uge bunch of changes from the code formatter. it seems, nebula projects do not use the eclipse code formatter.
Comment 2 Wim Jongman CLA 2011-11-16 16:29:55 EST
This will fix the symptom, but the selection event should only be fired if the user presses the confirm key if the widget is not in simple mode. I fixed it according to your specs. Please give it a spin.
Comment 3 Reto Urfer CLA 2011-11-17 13:26:17 EST
I tried your changes within our appliction and it works fine
Comment 4 Wim Jongman CLA 2011-12-12 09:21:20 EST
Released to HEAD a while ago. Closing