View Issue Details

IDProjectCategoryView StatusLast Update
0005581JEDI VCL00 JVCL Componentspublic2012-09-10 14:15
Reporterroberto-novakoskyAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.35 
Target VersionFixed in Version3.46 
Summary0005581: TJvDBDateEdit showing blanks with ClientDataSet when date on the field is seted to 1899-12-30
DescriptionExample:
When a value on a Field on clientDataSet is seted to '1899-12-30' (corresponding to integer 0) the TJvDBDateEdit linked to the field shows blank text. The correct is it shows '1899-12-30'
Additional InformationWhen value on a Field on clientDataSet is seted to '1899-12-31' (corresponding to integer 1) the TJvDBDateEdit linked to the field shows correctly.

The problem seams that internal code, when the date is 0, understand as nullDate, a TDateTime 0 defined inside code. 0 is a valid Date (0 = '1899-12-30') but is not showing in this case. The correct is it shows '1899-12-30'.

Sugestion: Always shows if the field has a Valid Date.

My tests:
1)
MyClientDataSet.FieldByName('my_date').AsDAteTime := 0;
  TJvDBDateEdit must to show '1899-12-30', fail - show blank
2)
MyDateTime := StrToDateTime('1899-12-30');
MyClientDataSet.FieldByName('my_date').AsDAteTime := MyDateTime;
  TJvDBDateEdit must to show '1899-12-30', fail - show blank
3) To other values works fine
MyClientDataSet.FieldByName('my_date').AsDAteTime := -1;
 TJvDBDateEdit shows '1899-12-29', sucess OK

(Tests using Delphi 2006 and JEDI VCL 3.35)


TagsNo tags attached.

Activities

obones

2011-06-07 18:01

administrator   ~0018637

Please provide the zipped sources of a sample application showing this

2011-06-15 14:24

 

JediReportJvDBDateEdit.zip (546,416 bytes)

roberto-novakosky

2011-06-15 14:26

reporter   ~0018767

zipped file added, using Delphi 2006 and JEDI VCL 3.35

obones

2012-02-23 10:58

administrator   ~0019495

Added ShowNullDate property, False by default. Set it to True and you get the desired behavior

Issue History

Date Modified Username Field Change
2011-05-19 17:27 roberto-novakosky New Issue
2011-06-07 18:01 obones Note Added: 0018637
2011-06-07 18:01 obones Status new => feedback
2011-06-15 14:24 roberto-novakosky File Added: JediReportJvDBDateEdit.zip
2011-06-15 14:26 roberto-novakosky Note Added: 0018767
2011-09-21 11:46 obones Status feedback => acknowledged
2012-02-23 10:58 obones Note Added: 0019495
2012-02-23 10:58 obones Status acknowledged => resolved
2012-02-23 10:58 obones Fixed in Version => Daily / SVN
2012-02-23 10:58 obones Resolution open => fixed
2012-02-23 10:58 obones Assigned To => obones
2012-09-10 14:15 obones Fixed in Version Daily / SVN => 3.46