Using Flatpicker for Month/Year | XM Community
Skip to main content

Hello again!
I'm trying to use Flatpicker to set dates in month/year format.
I put it in the Look and Feel; General; Header in the source code view.


It saves, but when I try to Apply, it never finishes.
Any suggestions much appreciated.
Sincerely,
Erin

Hi there, I have used flatpickr's MonthSelect plugin to select dates in Month-Year format. Try putting the below in your survey's Header:





Then in the JavaScript for your Text Entry question, add the below:
jQuery("#"+this.questionId+" .InputText").flatpickr({
    disableMobile: "true",
plugins: :
    new monthSelectPlugin({
shorthand: true,
    dateFormat: "m/Y",
    altFormat: "F Y",
    theme: "material_blue"
    })
 ]
    });


I actually figured it out myself, and it works great!
Thank you,
Erin


Leave a Reply