Customize the Date picker to select Month and Year only

Abhishek96
Kilo Contributor

Customize the date picker to display on Month/Year only. Once the user selects the Month and year, value should be stored something like Oct-2019, Nov- 2019.

 

Something like below to select only Month and Year (without date).

 

find_real_file.png

1 ACCEPTED SOLUTION

Hi Abhishek,

you would require a custom UI macro as variable to show something like that if you are in catalog

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

8 REPLIES 8

Hi Abhishek,

As said earlier out of the box date field allows you to select the day,month and year

you can have a custom string field which will get populated on change of the date field

or

have 2 variables

1) drop down for months -  Jan, Feb, March, April, May, June, July etc

2) drop down for years - 2019,2020,2021 etc

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

This can be done easily , But is it possible to do it in a way similar to the image below.

find_real_file.png

Hi Abhishek,

you would require a custom UI macro as variable to show something like that if you are in catalog

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

monika94
Kilo Guru

Hi Abhishek,

How did you achieve this?

I have not used UI macro yet. So any help would be appropriated.

Regards

Monika