CA Service Management

  • 1.  How to create a mask to a hour field

    Posted May 30, 2017 01:50 PM
      |   view attached

    Hi,

    I'd created a new dtlTextbox field to get the time spent in a activity.


    But the field doesn't has a mask, and some users, for slip-up, filled the field with a wrong time, e.g., 12:80:70, where the format is hours:minutes:seconds.


    Anyone knows How coud I create a mask to avoid the user to put a wrong format ? The ideia is the minutes and the seconds doen't get higher then 59.

     

    Regads,

    Felipe Nunes



  • 2.  Re: How to create a mask to a hour field

    Posted May 30, 2017 11:09 PM

    You could write code for that.

     

    See this post which talks about validating a date for a general example of .js/.spl customisation.

    Validation for Date Field in detail_in.htmpl 

     

    You'd need to write fresh code in order to perform the checks that you're after.

    If you're new to SPL customisation, this might be jumping in the deep end. You might want to start out here:

    Where can I find Spel functions documentation? 

     

    Has anyone done something similar?

     

    Thanks, Kyle_R.