View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002580 | JEDI VCL | 00 JVCL Components | public | 2005-01-31 02:58 | 2005-05-25 11:21 |
Reporter | anonymous | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 BETA 2 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002580: TJvDateEdit : doesn't set modified flag if user set a date | ||||
Description | similar problem to fixed 2216 and 2524 Not fixed un 3.00 RC 1 | ||||
Tags | No tags attached. | ||||
|
Please provide an example project (zip file) |
|
i'm sorry, but I just ran a simple test, and typing in a date does set the modified flag. The changes introduced since RC1 have nothing to do with that. Please test again, or provide an example project describing what you get and what you expected. Should there be no answers in the next 7 days, this issue will be considered as solved. |
|
No answers in a timely manner -> Resolved |
|
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, JvToolEdit, StdCtrls, Mask, JvExMask, JvMaskEdit, JvCheckedMaskEdit, JvDatePickerEdit; type TForm1 = class(TForm) JvDateEdit1: TJvDateEdit; Label1: TLabel; Button1: TButton; Label2: TLabel; Label3: TLabel; Label4: TLabel; procedure DateEditBovitel1Exit(Sender: TObject); procedure DateEditBovitel1Enter(Sender: TObject); private { Déclarations privées } public { Déclarations publiques } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.DateEditBovitel1Exit(Sender: TObject); begin if TJvDateEdit(Sender).modified then TJvDateEdit(sender).color := clGreen //never else TJvDateEdit(sender).color := clRed; //always end; procedure TForm1.DateEditBovitel1Enter(Sender: TObject); begin TJvDateEdit(sender).color := clwindow; end; end. |
2005-03-04 02:39
|
DateEditmodified.zip (12,736 bytes) |
|
Confirmed under D7 and WinXP. Problem lies in TJvCustomDateEdit.SetDate |
|
Ok. Here is a solution: In JvToolEdit.pas, replace the original code of TJvCustomDateEdit.SetDate(Value: TDateTime); by the following code: procedure TJvCustomDateEdit.SetDate(Value: TDateTime); var D: TDateTime; SavedModified : Boolean; begin if not ValidDate(Value) or (Value = NullDate) then begin if DefaultToday then Value := SysUtils.Date else Value := NullDate; end; D := Self.Date; SavedModified := Modified; TestDateBetween(Value); // Polaris if Value = NullDate then Text := '' else Text := FormatDateTime(FDateFormat, Value); Modified := SavedModified or (D <> Self.Date); end; This will mimic the behaviour of the standard TEdit. This means that once Modified is set to True by a change of Date, it will remain True until YOUR code sets it to False. Hence, you have to reste Modified to False in an event of your convenience. This is NOT (yet) in CVS, please provide feedback to indicate if this is alright with you. |
|
This is now fixed in CVS. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-01-31 02:58 | anonymous | New Issue | |
2005-02-03 00:38 | obones | Note Added: 0006346 | |
2005-02-03 00:38 | obones | Status | new => feedback |
2005-02-04 01:28 | obones | Note Added: 0006376 | |
2005-02-25 05:12 | obones | Status | feedback => resolved |
2005-02-25 05:12 | obones | Fixed in Version | => 3.00 |
2005-02-25 05:12 | obones | Resolution | open => fixed |
2005-02-25 05:12 | obones | Assigned To | => obones |
2005-02-25 05:12 | obones | Note Added: 0006572 | |
2005-03-04 02:36 | anonymous | Status | resolved => feedback |
2005-03-04 02:36 | anonymous | Resolution | fixed => reopened |
2005-03-04 02:36 | anonymous | Note Added: 0006640 | |
2005-03-04 02:39 | anonymous | File Added: DateEditmodified.zip | |
2005-04-12 06:00 | obones | Note Added: 0006943 | |
2005-04-12 06:00 | obones | Status | feedback => confirmed |
2005-05-14 14:41 | obones | Note Added: 0007165 | |
2005-05-14 14:41 | obones | Status | confirmed => feedback |
2005-05-25 11:21 | obones | Status | feedback => resolved |
2005-05-25 11:21 | obones | Fixed in Version | 3.00 => |
2005-05-25 11:21 | obones | Resolution | reopened => fixed |
2005-05-25 11:21 | obones | Note Added: 0007346 |