- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 07:55 AM
Hello,
I have the following date field. However, I want the user to be able to select the month and the year and not the day too.
So, instead of today date, the user would select November 2020.
However, I don't want to do it with a dropdown list, but with a date picker.
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 12:22 AM
Hi,
So you created 2 drop down variables.
So you need to concatenate Month and Year in the Short Date
If yes then you would require 2 onchange client scripts 1 for Month and another for Year
then you can set the value by joining in the Short Date
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 08:01 AM
Hi,
Surely you would have gone through other links but as of now it is available OOB & if customized would require additional efforts & would be a fully custom solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 11:23 PM
Unfortunately, I couldn't find a solution to this.
If I need to make a customized solution,
what do I need to create?? A UI macro??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 11:34 PM
Hi,
For custom solution
Please create 2 variables of type drop down
1st having drop down values as months Jan to December
2nd having drop down values year from 2001 to 2020 or depending on your client requirement
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 12:09 AM
Hey
I followed your suggestion.
I have the following form, I would like to populate the field date based on selected month and year.
In the following example, the date must be "January 2018".
So, I guess that I need to create an onChange client script on the variable "u_month" and on the variable "u_year".
If one of the two variables is "None", then the "Date" should be empty.
However, I see that a client script runs only on change of one variable.
Can I have the same catalog script for the change of two variables?