URGENT !! Datetimepicker validation

6 posts, 0 answers
  1. Vijay
    Vijay avatar
    8 posts
    Member since:
    Oct 2007

    Posted 03 Jul 2008 Link to this post

    Hi,
    i have used the following code in 'valueChanged' event, But it does not help

    dtpLDDate.DateTimePickerElement.TextBoxElement.TextBoxItem.ReadOnly = true;


    Minimum date value that we have is 1753(year), if in any case user enters any value less than 1753(year), then the datetimepicker control does not fire any event(Neither 'valuechanged' nor 'keypressed').
    Please suggest me some solution to fix this problem.
    Please reply soon.
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 04 Jul 2008 Link to this post

    Hello Vijay,

    Thank you for contacting us.
    At first I would like to ask you what version of RadControls for WinForms you currently use?
    Currently the MinDate value cannot be set to a date before 1900. Otherwise it would throw an exception if you are using the current version. The min date (1,1,1900) is the minimum effective date we have put as a lowest date bound and the user cannot set it to something before than this date. If you are using the current version Q1 SP1 and try to set the date less than the (1,1,1900) could you please give me some instructions how to reproduce this ? 
    The issue with the Key events in RadDateTimePicker is known and we will have a fix for it for the next version. However, there is a workaround that lets you subscribe to the KeyEvents: RadDateTimePickerElement has a property named TextBoxElement. This property holds the child mask box shown in the  RadDateTimePicker and you can subscribe to its Key events and receive KeyUp, KeyDown or KeyPress.

    I can assure you that we will consider changing the Min, Max dates behavior in RadDateTimePicker but at the moment in this version you cannot set a date before 01.01.1900.

    If you have more questions please write me back.

    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Vijay
    Vijay avatar
    8 posts
    Member since:
    Oct 2007

    Posted 06 Jul 2008 Link to this post

    TextBoxElement events are working fine.
    Thanks a lot for your kind support
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 09 Jul 2008 Link to this post

    Hello Vijay,

    I'm happy to hear that everything works as expected.
    Do not hesitate to write me back if you need more instructions about RadDateTimePicker.

    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. moh salhi
    moh salhi avatar
    3 posts
    Member since:
    Feb 2010

    Posted 09 Jun 2010 Link to this post

    hi ,

    can you help me wiht sample code, to add key press event to rad datetimepicker
    remark : i have version 2010 Q1 sp1
    thanks .
  7. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 14 Jun 2010 Link to this post

    Hi moh salhi,

    Thank you for contacting us.

    You can subscribe to the KeyPress event of RadDateTimePicker as shown below:
    public Form1()
    {
        InitializeComponent();
        this.radDateTimePicker1.KeyPress += new KeyPressEventHandler(radDateTimePicker1_KeyPress);
    }
    void radDateTimePicker1_KeyPress(object sender, KeyPressEventArgs e)
    {
        MessageBox.Show("KeyPress");
          
    }

    Let me know if you have any other questions.

    Greetings,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for WinForms is Visual Studio 2017 Ready