Datepicker select month and year only

Hi,
how can i bound datepicker to select month and year only?

anybody?

1 Like

Hi @shahid, did you manage to find the solution?

Not yet. :frowning:

Try below code on .js file on change of your date.

sdate: function(frm) {
var dte = frm.doc.sdate;
var mySubString = dte.split("-");
var arr = [‘Jan’,‘Feb’,‘Mar’,‘Apr’,‘May’,‘Jun’,‘Jul’,‘Aug’,‘Sep’,‘Oct’,‘Nov’,‘Dec’]
var mnth = mySubString[1] - 1;
frm.set_value(“sdate”,arr[mnth] +"/"+ mySubString[0])
},

1 Like