In date/time variable,should be selected in PST time zone and should not allow past dates selection

Bhanu_thej
Tera Contributor

Hi @Ankur Bawiskar @Maik Skoddow @Mohith Devatte @SwarnadeepNandy @SANDEEP28 

 

My requirement is,In date/time variable,date should be selected in PST time zone and should not allow users to select past dates.

 

i have already an existing client script which makes users not to select PST time zone.Here is the screenshot below 

 

Bhanu_thej_0-1695265824202.png

Please help me on my requirement.

13 REPLIES 13

Hi @Ankur Bawiskar 

 

with the above script it was considering past dates. we are able to select past dates.

Bhanu_thej_0-1695780907434.png

 

The script shared by Ankur works fine. Did you check variable name is correct in your client script?

Regards
Harish

@Bhanu_thej  

it should work fine.

Did you debug by adding alert?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar @Harish KM 

 

In client script the variable name looks correct only, but i am facing two issues 

1.start date/time variable is populating the time according to the users instances time 

for example : i changed my instance time to IST and when i trying to select  start date/time variable in the form, the time displays only in IST not in PST. for your reference

 

Bhanu_thej_0-1695794740356.pngBhanu_thej_1-1695794783331.png

2. My requirement is  start date/time variable is to display or select only in PST time zone irrespective of the users instances time zone.  please help me on this 

Hi @Ankur Bawiskar @Harish KM  @Maik Skoddow @Mohith Devatte @SwarnadeepNandy @Hardik2109 

 

Please help me on the below requirement

 

In client script the variable name looks correct only, but i am facing two issues 

1.start date/time variable is populating the time according to the users instances time 

for example : i changed my instance time to IST and when i trying to select  start date/time variable in the form, the time displays only in IST not in PST. for your reference

 

Bhanu_thej_0-1696403079358.png

 

Bhanu_thej_1-1696403079373.png

 

2. My requirement is  start date/time variable is to display or select only in PST time zone irrespective of the users instances time zone.  please help me on this