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

  • Profile Image
    MESAR
    Asked 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. 

  • Profile Image
    pinoytech
    Answered 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
    MESAR
    Answered 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
    pinoytech
    Answered 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
    MESAR
    Answered on February 14, 2014 at 02:37 PM

    Wow thank you very much ;)

  • Profile Image
    dudiack
    Answered 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
    abajan
    Answered 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
    abajan
    Answered 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.