1
0
-1

Hi Experts,

I have a created a script to count total days between 2 date in a datepicker. It works. However, I wouldn't want the user to able to edit the date. By set the section or the datepicker field to readonly using Joget-already has function, the script to calculate the total days is not working.


Below shows day of process not working when both date is set to readonly using Joget Readonly function:


I have tried many different syntax to do this however all of them doesn't work. Here's my reference: https://stackoverflow.com/questions/7812063/jquery-datepicker-readonly . Can anyone help me :<

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      hi Mr Anders. It's actually a datepicker. below is the full screenshot. 

      1. Anders

        Yes, but it appears to revert to a textfield when it is readonly.

      2. monday

        oh no actually still datepicker. it looks like textfield because the blue arrow is hiding it

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hi, from the screenshot the readonly date is shown in a textfield. In any case, you can try to obtain the value of a field using Javascript API#getValue(fieldId).

        CommentAdd your comment...