View Issue Details

IDProjectCategoryView StatusLast Update
0001805JEDI VCL00 JVCL Componentspublic2004-12-20 06:17
ReporterhamiltonAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.00 RC 1 
Summary0001805: For TJvDBDateTimePicker : If NullText = SPACE then pressing DELETE completely disables the control
DescriptionI am using a JvDateTimePicker and setting the NullText value to ' '. Pressing DELETE completely disables the DateTimePicker if it is used to display the time.

I can think of a couple of workarounds that would fix this behaviour so perhaps calling it a bug is being unkind, but I think my situation will be a typical one and that the best fix would be in altering the control.
Additional InformationSome of my datasets represent status lists that are frequently empty, so I use ' ' as the NullText value for my date and time controls. I imagine other people do the same?

The problem is that pressing DELETE also sets the date or time to ' '. The JvDBDateTimePicker then becomes disabled and will not accept numbers.

If the control is used to display the date then the dropdown calendar still works, so the control is not completely disabled. However, if the control is used to display the time then the scrollbuttons are disabled and the edit is disabled.

There are 3 ways I can think of fixing this:
* Allowing CTRL+D to be blocked through a parameter (rather than having to write OnKeyDown handlers)
* Do not disable the scroll buttons when null text is displayed (ie make time work like date)
* When a valid number or up/down arrow is pressed AND the current field value is invalid then reset the field value to some date (preferrably not 1899!)

There was perhaps a more succinct way of saying all that.
TagsNo tags attached.

Activities

user72

2004-05-27 11:50

  ~0004391

Actually, this doesn't seem to be limited to using spaces. For example, I tried with '(none)' as NullText with the same result.

I've tried to check the various CN_NOTIFY codes but so far I haven't found anyone that is sent when the up/down arrows are clicked in time mode.

The problem in date mode is not as serious as you can set the date by clicking the down arrow and selecting a date. Not very good though...

hamilton

2004-05-27 12:02

reporter   ~0004394

> Actually, this doesn't seem to be limited to using spaces.
> For example, I tried with '(none)' as NullText with the same result.

Yes, pressing '1' when the control text is '(whatever)' does not produce a valid date, so the keypresses (including cursors) will be ignored, and any NullText other than a valid date/time will produce the same error.

I think the fix here is going to involve more than 1 change.
1) Getting keyboard characters to be accepted will involve setting the date to some default value when the NullText is displayed and a valid key is pressed (please not 1899!!)
2) Getting the scroll buttons to work will involve deciphering those mysterious looking JvControl messages. I was tracing this through and hit assembler :s

I'd volunteer but I'd better go put in some paid time..

user72

2004-06-25 05:07

  ~0004632

I won't have time to look into this issue, so someone else has to take over.

hamilton

2004-08-08 03:59

reporter   ~0004967

This bug still exists in the latest source. I tested on Delphi 7.1
with JCL and JVCL downloaded on Saturday 2004-08-07.

obones

2004-11-19 01:27

administrator   ~0005670

Please try with the latest zip files and tell us if the problem is fixed. These files are available here:

http://jvcl.sf.net/daily/
http://jcl.sf.net/daily/

If we don't hear from you in the next 30 days, we will consider this issue fixed.

obones

2004-12-20 06:17

administrator   ~0005948

This issue is now considered fixed.
Should it not be the case, please open a new one.

Issue History

Date Modified Username Field Change
2004-05-27 10:38 hamilton New Issue
2004-05-27 11:50 user72 Note Added: 0004391
2004-05-27 11:50 user72 Status new => assigned
2004-05-27 11:50 user72 Assigned To => user72
2004-05-27 12:02 hamilton Note Added: 0004394
2004-06-25 05:07 user72 Note Added: 0004632
2004-06-25 05:07 user72 Assigned To user72 =>
2004-06-25 05:07 user72 Status assigned => acknowledged
2004-08-08 03:59 hamilton Note Added: 0004967
2004-11-19 01:27 obones Note Added: 0005670
2004-11-19 01:27 obones Status acknowledged => feedback
2004-12-20 06:17 obones Status feedback => resolved
2004-12-20 06:17 obones Resolution open => fixed
2004-12-20 06:17 obones Assigned To => obones
2004-12-20 06:17 obones Note Added: 0005948
2004-12-20 06:17 obones Assigned To obones =>