Is it possible to have a field that just asks for month and year?

  • VolleyballQLD
    Asked on May 28, 2020 at 2:59 AM

    Hello,

    Is it possible to have a field that just asks for month and year?  Not interested in day.  Don't mind the data submitted is the 1st of the month.

    Thanks

  • Richie JotForm Support
    Replied on May 28, 2020 at 5:04 AM

    It is possible to hide the day field if you disable the lite mode in your date picker field and use custom CSS to hide the fields.

    Is it possible to have a field that just asks for month and year? Image 10

    May we know the form that you would like us to edit the CSS of the date picker field?

    Looking forward for your response.

  • VolleyballQLD
    Replied on May 30, 2020 at 12:17 AM

    Thanks Richie,

    The form is Coach Accreditation https://www.jotform.com/build/201461752861858

    The field at the moment is Course Year which has been set up as a Short text. (Don't know why, I didn't set it up).  I was hoping here to get the applicant to add month to the year. 

    Most cases the person will remember which month and year of their course but not day. 

    Thanks
    Jill Kelly

  • Richie JotForm Support
    Replied on May 30, 2020 at 4:35 AM

    I have created a cloned version of your form and added the datepicker field in the Course Year.

    Here is the Form URL https://form.jotform.com/201501620756951

    You may clone my form, here is a guide:https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    Let us know if you need further assistance.

  • VolleyballQLD
    Replied on May 30, 2020 at 10:47 PM

    Thank you, works wonderfully.

  • VolleyballQLD
    Replied on June 6, 2020 at 6:37 AM

    Just a minor issue I feel the need to share.

    After testing I have discovered that when the user types in the month and year (not using the popup) you get the error message, "This date is not valid. Enter a valid day."1591415698a Screenshot 10

    Which is not great asking the user to enter a day when they can't.  I solved the problem by setting up a default date, not a great solution because users may just leave it as that.

    Thanks


  • Welvin Support Team Lead
    Replied on June 6, 2020 at 9:35 AM

    Our apologies. You're only hiding the day input, and that is still considered required. The CSS codes did not void it. The workaround to set a default date may work, but my suggestion would be to use the following widget:

    https://www.jotform.com/widgets/fixed-format

    Format the widget to have two input boxes.

    Or the following widget (except if you are after of the aesthetic of the field)

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

    Guide to add a widget: https://www.jotform.com/help/252-How-to-Add-a-Widget-to-Your-Form.

  • VolleyballQLD
    Replied on June 8, 2020 at 2:11 AM

    Thank you for the suggestions.

    With the fixed-format there is no validation on the fields, I can even leave one blank.  So I won't be using that.

    With the Datepicker-year-month there is a minor problem with the lack of the right border of the field.  see screenshot.

    1591596613a Screenshot 10

    But also there is no way to limit the dates to past only which I can do in the date field.  So I will have to weigh the pros and cons of the CSS solution on a date field and the widget datepicker-year-month.

    Thank you for your time