What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    [Custom CSS for Birth Date Picker] Display only month and year.

    Asked by MESAR on February 14, 2014 at 11:26 AM

    Is there a way to put a (Date of birth) but without the day ?
    Like, the guess can only choose month and year. 

    and date only date of birth
  • Profile Image

    Answered by pinoytech on February 14, 2014 at 12:20 PM

    Hi,

    Using custom css, you can achive that in your form. Please take a look at this demo form that I've created.

    http://www.jotformpro.com/form/40444852500952

    Please follow this simple steps:

    1. Use/Add Birth Date Picker field which can be found under Quick Tools.

    2. Append this custom css to hide "DAY" field.

    #input_1_day {

    display: none;

    }

    #sublabel_day {

    display: none;

    }

    If you need further assistance, please let us know.

  • Profile Image

    Answered by MESAR on February 14, 2014 at 01:18 PM

    The code is not accurate, it doesnt show as what i want.
    Can u revise the code and test it plz

  • Profile Image

    Answered by pinoytech on February 14, 2014 at 01:29 PM

    Hi,

    Sorry about that. Can you please take a look at your form now? I've fixed it for you.

    http://www.jotform.ca/form/40425580473251

    Feel free to contact us again if you need further assistance.

  • Profile Image

    Answered by MESAR on February 14, 2014 at 02:37 PM

    Wow thank you very much ;)

  • Profile Image

    Answered by dudiack on April 07, 2014 at 09:50 AM

    Can you please add the correct code to this thread so I can add it to my form?

  • Profile Image
    JotForm Support

    Answered by abajan on April 07, 2014 at 10:49 AM

    @dudiack

    The code can be seen in the form's source but it is specific for that form and probably won't work with your form due to its date field having a different ID. Nevertheless, here's the code:

    #day_22 {
    display: none;
    }

    #month_22 + span, label[for="day_22"], #input_22_pick {
    display: none;
    }

    The highlighted numbers would need to be changed to match the ID of your form's date field. You can check the ID either in the form builder or inspect the date field with your browser's built in developer tools at the form's URL. Please see this guide for details.


    Thanks

  • Profile Image
    JotForm Support

    Answered by abajan on April 07, 2014 at 11:19 AM

    The following is a repost of dudiack's reply which didn't show up in the thread but received in my inbox

    That didnt work but it helped regardless because I took the info from you about finding the ID and I applied it to th eoriginal CSS code mentioned at the top of this thread and that worked. Thanks.