Date picker with only year and month (yyyy/mm)

  • Lacroix_Thomas
    Asked on March 10, 2021 at 9:02 PM

    Hello! Would it be possible to set the the date picker to choose only a year and a month? I would like to disable the "day" in the date picker. I found the date picker year and month but its design is a little "off" for the rest of my form and the options are in english, while my form is in french. Thank you!

    Jotform Thread 2958462 Screenshot
  • Girish JotForm Support
    Replied on March 11, 2021 at 4:30 AM

    Are you referring to this Date field on the form: https://www.jotform.com/form/210636239881258?

    1615454954 6049e2ea5ea7e 1103 17 Screenshot 10

    If yes, please add this CSS code into the form:

    #input_76_day.form-dropdown, #sublabel_76_day.form-sub-label {

    display: none;

    }

    Do test and let us know if this works out for you.

  • Lacroix_Thomas
    Replied on March 11, 2021 at 11:21 AM

    Hello, no I'm talking about this date picker from my form:1615479435 604a428b20baf  Screenshot 10

    I see its ID is 82 instead of 76. I tried to simply change it in the CSS code you provided, but it doesn't seem to work as you can see here:

    1615479703 604a43979e7a5  Screenshot 21


    Thank you for your quick feedback!


  • Basil JotForm Support
    Replied on March 11, 2021 at 4:27 PM

    Hi,

    Unfortunately, the date picker fields/widget could only process formats that are on their Date Format option list.

    The CSS changes my colleague provided are for the birth date widget.

    As a workaround, you may use other widgets like Localized Calendar and DatePicker Year Month, which have the option to show month and year only.

    https://www.jotform.com/widgets/datepicker-year-month

    Please let us know if you require any further assistance.

  • Lacroix_Thomas
    Replied on March 16, 2021 at 10:06 PM

    Hi! Is there a way to translate the months in this date picker widget? My form is in french. I tried the localized calendar to use French, but I really need only a MM/YYYY and The other is not right. Also, is it possible to edit the look of it? Like making it smaller for example? Thanks!

    1615949967 6051708f14f80  Screenshot 10

  • Girish JotForm Support
    Replied on March 16, 2021 at 11:12 PM

    I have moved your last response to a new ticket link as the topic is different from the one earlier discussed on this ticket.

    Here is the new ticket link: https://www.jotform.com/answers/2972918