CA Service Management

  • 1.  Service Catalog input date&time on a form date-component

    Posted Aug 03, 2018 07:57 AM

    Suppose in a form in Service Catalog, we need to add one new field which will ask  the customers to enter in time when is the best available time to call them back. What is the best way to add this field?



  • 2.  Re: Service Catalog
    Best Answer

    Posted Aug 05, 2018 09:17 PM

    I suggest a text field and use a regular expression in the Pattern attribute. Here is an example regex for time:

    ^(([0-9]|[0-1][0-9]|2[0-3]):([0-5][0-9])$)|(([1-9]|1[0-2]):([0-5][0-9])\s?(am|AM|pm|PM)$)



  • 3.  Re: Service Catalog input date&time on a form date-component

    Broadcom Employee
    Posted Aug 07, 2018 03:03 AM

    Good Morning Pallavi.

    Some other examples of 'date&time' functionality through java functions.

    You can use a JavaScript expression similar to the following for the 'Maximum Value' form-date-field attribute:
    $(new Date().getTime() + 31556952000)
    Where 31556952000 is a year in milliseconds.
    ==============================
    As getTime() is in milliseconds you could use something like the following for the 'Minimum Value':
    $(new Date().getTime() + 259200000)
    Where, 3 x 86400000 (one day in ms) = 259200000

    Thanks and kind regards, Louis van Amelsfort.