How to set date in RadMaskedDateTimeInput

2 posts, 0 answers
  1. Dumitru
    Dumitru avatar
    4 posts
    Member since:
    Mar 2011

    Posted 21 Aug 2012 Link to this post

    Hi. 
    The question is in the title. I tried to use TypeText method but looks like it's not working. There is a property Text, but it's read-only. Also I didn't found any examples with RadMaskedInput controls in the sample solution which installs with the framework. Maybe I am missing something: some property or method? please help.
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 24 Aug 2012 Link to this post

    Hello Dumitru,

    You need to click in the Date Time text input field first, in order to set the focus on it and activate it. Then use the TypeText method and the value should be entered as expected.
     
    Here's a sample code against this RadMaskedDateTimeInput demo:
    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
    RadMaskedDateTimeInput dtInput = app.Find.ByAutomationId<RadMaskedDateTimeInput>("radMaskedDateTimeInput");
     
    dtInput.MouseClick(MouseClickType.LeftClick, 1, true);
    dtInput.TypeText("26082012", 10);

    Please give it a try and let me know if you need further assistance on this.

    Greetings,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top