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

  • Profile Image
    Lacroix_Thomas
    Asked on March 10, 2021 at 09: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!

    Screenshot
  • Profile Image
    gerardw
    Answered on March 11, 2021 at 04:30 AM

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

    1615454954_6049e2ea5ea7e_1103_17.png

    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.

  • Profile Image
    Lacroix_Thomas
    Answered on March 11, 2021 at 11:21 AM

    Hello, no I'm talking about this date picker from my form:1615479435_604a428b20baf_

    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_


    Thank you for your quick feedback!


  • Profile Image
    Basil_A
    Answered on March 11, 2021 at 04: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.

  • Profile Image
    Lacroix_Thomas
    Answered 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_

  • Profile Image
    gerardw
    Answered 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