1
0
-1

Hi Avoka Team,

We have a datepicker (Start Date) that is automatically populated based on the value of dropdown selected. If the value of the datepicker is set to empty, the calendar still displays the previously populated date. How does the calendar value gets cleared and set to the current date? Which part of the maestro code should be set and how?


Thanks,

Lira

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Lira,

      You can initialise it in a calculation rule like: data.datePicker = "2018-09-05", remember to keep the format you chose.

      If your source is another component, add the reference to that component instead of the fixed value in my example.

      Hope it helps.

      Julio

      1. Lira Chantong

        Hi Julio,

        The requirement is once the date picker is cleared it should retain the current date on the calendar section. Nothing should display on the text field area. If I do that the value would be populated on the text field area also.


        Thanks,

        Lira

      2. Julio Berrueco

        Mmm, not sure if we can achieve that in one step.

        Maybe you can do data.datePicker= null when clear button is clicked (I guess to clear the value of that date there is a button), whit this there's no date in the box..

        Later, on submit, if data.datePicker== null then set today date?

      CommentAdd your comment...