C1DateEdit - Stop manual editing of date?

Posted by: jxbhome on 10 May 2021, 3:52 am EST

  • Posted 10 May 2021, 3:52 am EST

    Is there a way to stop the user being able to manually edit a date but instead are forced to use the calendar drop-down only?

    Thanks - John
  • Marked as Answer

    Replied 10 May 2021, 8:34 pm EST

    Hello John,

    You can handle the KeyDown event of C1DateEdit and set the SuppressKeyPress property of the KeyEventArgs to true to stop the editing via Keyboard.
    c1DateEdit1.KeyDown += C1DateEdit1_KeyDown;

    private void C1DateEdit1_KeyDown(object sender, KeyEventArgs e)
    {
    e.SuppressKeyPress = true;
    }



    Regards,
    Prabhat Sharma.
Need extra support?

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

Learn More

Forum Channels