How to Prevent C1DateEdit from Auto Filling Date on Mouse Click

Originally Posted 18 November 2016, 8:49 pm EST

  • Originally Posted 18 November 2016, 8:49 pm EST


    Using version 4.0.20163.212 of controls.

    How does one prevent mouse click from auto populating the current datetime in C1DateEdit control?

    I cannot figure out how to accomplish this and need to have this behavior turned off.

    Thank you,
  • Reply

    Hi Gregg,

    As of now you could implement this by extending C1DateEdit control and overriding its OnMouseDown method. There is no other way to accomplish this.

    public class ExtendedC1DateEdit : C1.Win.C1Input.C1DateEdit
    protected override void OnMouseDown(MouseEventArgs e)
    if(this.Value.ToString().Trim().Length > 0)

    Now you can drop down ExtendedC1DateEdit control on your from toolbox once the project is rebuilt.

  • Marked as Answer


    Thank you Nilay.

    That works as we are already using an inherited version of the C1DateEdit control in our projects.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels