DatePicker doesn't clear invalid value

3 posts, 0 answers
  1. Triet Nguyen Cong
    Triet Nguyen Cong avatar
    78 posts
    Member since:
    Mar 2010

    Posted 01 Aug 2010 Link to this post

    Hi Telerik team,

    In DatePicker control (latest version), I enter free-text (sample: adfadfadf), the controls will keep it and doesn't clear this invalid value. In other version, DatePicker control will clear invalid value automatically. How can I work-around this problem?

    Thanks,
    Triet
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 04 Aug 2010 Link to this post

    Hi Triet Nguyen Cong,

    You can use ParseDateTimeValue event. Use the code below.
    private void timepicker_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
    {
        if (args.IsParsingSuccessful == false)
        {
            (sender as RadTimePicker).DateTimeText = "";
        }
    }


    Best wishes,
    Boyan
    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
  3. DevCraft banner
  4. Triet Nguyen Cong
    Triet Nguyen Cong avatar
    78 posts
    Member since:
    Mar 2010

    Posted 09 Aug 2010 Link to this post

    Thanks Boyan!

    It works exactly what I expect.
Back to Top