Since you are using Flatpickr, you can use the Monthselect plugin. To give it a try, first add the below to the survey’s header:
<link href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/flatpickr@latest/dist/plugins/monthSelect/style.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<script src="https://cdn.jsdelivr.net/npm/flatpickr@latest/dist/plugins/monthSelect/index.js"></script>
Then, add the below to the JavaScript of the Text Entry question in the OnReady section:
jQuery("#"+this.questionId+" .InputText").flatpickr({
disableMobile: "true",
plugins: :
new monthSelectPlugin({
shorthand: true,
dateFormat: "m/Y",
altFormat: "F Y",
theme: "material_blue"
})
]
});
For Mobile devices, to avoid using the phone's built-in calendar which would include days, disableMobile: true can be added to flatpickr, like in the above.