View Issue Details

IDProjectCategoryView StatusLast Update
0003181JEDI VCL00 JVCL Componentspublic2006-01-12 09:21
ReporterthuvnAssigned Toelahn 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.20 
Summary0003181: TJvDateEdit - Econvert with message "19/19/2005" is not a valid date.
DescriptionWhen user enters date that it is different from system's date format(for example system's date format is dd/mm/yyyy but date from user is mm/dd/yyyy). This component causes a error 'Econvert with message "19/19/2005" is not a valid date.'
How can i do?

Thu.
TagsNo tags attached.

Activities

elahn

2005-09-08 20:08

developer   ~0007923

To work around, add an OnInvalidDate with the following code:
  try
    NewDate := StrToDateFmt('mm/dd/yyyy', DateString);
    Accept := True;
  except on E: EConvertError do
    Accept := False;
  end;
You will need to add JvJCLUtils to your uses clause.

A better solution would be to add a 'DateFormatString' or 'FormatString' property which would change the format for all users regardless of locale settings. To make this fully useful, a 'PreferredDateFormat' property with possible values of (pdLocale, pdLocaleOnly, pdCustom, pdCustomOnly) and pdLocaleOnly as the default, in order to maintain backward compatibility.

enjoy life,
            Elahn

obones

2006-01-08 12:28

administrator   ~0008351

Can anyone look at this ?

elahn

2006-01-11 02:52

developer   ~0008367

I assume there's no rush, since it was started in september last year. However, if you'd like it for the 3.2 release, let me know. :)

elahn

2006-01-12 09:21

developer   ~0008377

Now in CVS. The properties added are: DateFormat and DateFormatPreferred

Issue History

Date Modified Username Field Change
2005-09-06 22:03 thuvn New Issue
2005-09-08 20:08 elahn Note Added: 0007923
2006-01-08 12:28 obones Note Added: 0008351
2006-01-08 12:28 obones Status new => feedback
2006-01-11 02:51 elahn Status feedback => assigned
2006-01-11 02:51 elahn Assigned To => elahn
2006-01-11 02:52 elahn Note Added: 0008367
2006-01-12 09:21 elahn Status assigned => resolved
2006-01-12 09:21 elahn Resolution open => fixed
2006-01-12 09:21 elahn Note Added: 0008377