Bug Report T925628
Visible to All Users

cxDateEdit - The OnEditValueChanged event can occur twice when an end-user changes the edit value via the editor's drop-down window if the Properties.Kind property is set to ckDateTime

created 5 years ago

Hello
I am using TcxDateEdit format datetime.
When I set the date and time through the drop-down calendar (for example now), OnEditValueChanged is triggered. It is right
But when I switch to another control, OnEditValueChanged is triggered again, although the value has not changed. This is bad because leads to repeated execution of the request.
If you work with the date-only format, then the OnEditValueChanged event does not fire when focus is lost.

Show previous comments (7)
DevExpress Support Team 5 years ago

    Hello Ilya,

    Our developers are still working on this issue.
    I am afraid we cannot give you a precise time frame as to when it will be fixed.

      Hello, Mikhail
      How do I get the fix? I requested on the form below, but for 2 days there is nothing, only the text "* 20.1.6Hotfix requested and is being prepared"

      DevExpress Support Team 5 years ago

        Hello Ilya,

        We don't provide hotfixes for outdated versions. Nevertheless, you can try applying the following code fix:

        Delphi
        procedure TcxCustomDateEdit.DateChange(Sender: TObject); var ADate: Double; ADisplayValue: TcxEditValue; begin BeginUserAction; try FCloseUpReason := crEnter; ADate := Calendar.SelectDate; if ActiveProperties.Kind = ckDateTime then ADate := dxDateOf(ADate) + cxSign(ADate) * dxTimeOf(TDateTime(Calendar.Time)) else if ActiveProperties.SaveTime and (ADate <> NullDate) then if ADate >= 0 then ADate := ADate + dxTimeOf(FDateDropDown) else ADate := ADate - dxTimeOf(FDateDropDown); ADisplayValue := GetRecognizableDisplayValue(ADate); if ((Date <> ADate) or not InternalCompareString(DisplayText, VarToStr(ADisplayValue), True)) and DoEditing then begin LockChangeEvents(True); try if ADate = NullDate then Date := ADate else Date := VarToDateTime(DateTimeToTextEx(ADate, False)); ModifiedAfterEnter := True; SetInternalDisplayValue(ADisplayValue); SelectAll; finally LockChangeEvents(False); end; end; finally EndUserAction; end; end;

        Answers approved by DevExpress Support

        created 5 years ago

        We have addressed the issue described in this ticket and will include a fix in our next maintenance update. To apply this solution before official release, request a hotfix by clicking the appropriate version link.

        Note: Hotfixes may be unavailable for betas/updates set for release within a week.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.