Forum Discussion

macheshmeh's avatar
macheshmeh
Contributor
3 years ago

the value in calendar change to default value

Spoiler
 

in one of the test i have to save the date and time and use them to another form 

1) i use the getPropertyValue for store the object value (date and time) in a variable 

     ProjectSuite.Variables.date_fin_constant = aqObject.GetPropertyValue(Aliases.....DateEdit.TextBoxMaskBox, "wText");

 

2)i use the setText for set the value:

     Aliases.........dateEdit.TextBoxMaskBox.SetText(ProjectSuite.Variables.date_fin_constant);

 

it works good but as soon as we click on another field, the field returns to the initial date and time 

it can't keep the new value 😞

 

  • If you copy a date manually and paste it in the date field and then click somewhere else, does it lose then date then also?

    • macheshmeh's avatar
      macheshmeh
      Contributor
      Thanks for your response, no manually everything is ok and works well
      • Marsha_R's avatar
        Marsha_R
        Moderator

        Try using Keys instead of SetText.  That mimics someone typing it in.

  • i changed the format of date and time and then instead of store in a variable i used the direct in test 

     

    date_fin_constant = aqObject.GetPropertyValue(Aliases.....DateEdit.TextBoxMaskBox, "wText");

     

    and i used the keys methode and worked 🙂