The CreatorCon Call for Content is officially open! Get started here.

Using g_form.getValue('start_date') return date month but i need month and date

Pramod Pandey2
Tera Contributor

Hi Community,

 

in change form we have planned start date and to validate date is not selected in past. For that i created client script

using g_form.getValue('start_date') but is user select 1 aug as start date, output which i get is 08 Jan.

Due to this i am facing issue.

 

Please let me know how to resolve this issue.

 

Regards

Pramod Pandey

1 ACCEPTED SOLUTION

Voona Rohila
Mega Patron
Mega Patron

Hi @Pramod Pandey2 

You can simply achieve this with a UI policy with no-code

Take a look at below article 

https://www.servicenow.com/community/developer-articles/no-code-date-validations-through-catalog-ui-...

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

2 REPLIES 2

Voona Rohila
Mega Patron
Mega Patron

Hi @Pramod Pandey2 

You can simply achieve this with a UI policy with no-code

Take a look at below article 

https://www.servicenow.com/community/developer-articles/no-code-date-validations-through-catalog-ui-...

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Rupanjani
Giga Guru

Hi @Pramod Pandey2,

 

Try to use the date format and change it from DD-MM-YYYY to MM-DD-YYYY.


Mark the response correct and helpful if the answer assisted your question.