How to display only month and year in a date field?

Student1
Tera Contributor

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.

find_real_file.png

However, I don't want to do it with a dropdown list, but with a date picker.

Any ideas?

 

1 ACCEPTED SOLUTION

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

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

View solution in original post

5 REPLIES 5

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

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