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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Abhishek,

Is this for date type of field?

Then this is not possible; Date field always store date in YYYY-mm-DD format

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

Hi Ankur,

can we do this if we store data as String in the field

Hi Abhishek,

so you can do following; 

1) have a string field

2) write onchange client script on that date field

when new date is selected then store the data in that format in the string field

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

Thanks for responding Ankur,

Actually what i need is when we click on the Date Picker icon ,there we should be able to add month and Year only.

Day should not be available as shown in the picture given with my question.