• Resolved user10522three

    (@zorrohere)


    Hi,

    Until now I never paid attention to date field, how can I set a date limit for date field? For example if I want to use date field for date of birth etc. At this moment date field is showing future dates as well.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author PressTigers

    (@presstigers)

    Hello @zorrohere,

    Yes, you can set the date limit of the date picker input. But for this, you have to write the custom code for this as we are using the third party date picker script library.

    Please add the following datepicker attribute in the simple-job-board-public.js file(simple-job-board/public/js) below line # 78 and set the date range according to your requirements.

    yearRange: "c-40:c-10"
    //minDate: -40,
    //maxDate: -10

    We are also sharing a link as a reference.

    Note: Modifications in plugin core files will be overridden when you update the plugin. SO, override this script files in your child theme or take backup of these files and then update the plugin.

    Thanks for reaching us out. Let us know if you need our further assistance.

    Regards,
    PressTigers

    • This reply was modified 7 years, 7 months ago by PressTigers.
    • This reply was modified 7 years, 7 months ago by PressTigers.
    Thread Starter user10522three

    (@zorrohere)

    Thanks alot

    Thread Starter user10522three

    (@zorrohere)

    Hi again,

    Just to let you know, to change datepicker settings I didn’t have to override your entire script, I mean I tried to but I was getting errors such as

    ReferenceError: application_form is not defined[Learn More] simple-job-board-public.js:284:17

    So I just stopped overriding and set datepicker values in my default script.

        $('.sjb-datepicker').datepicker({
            dateFormat: 'dd-mm-yy',
            changeMonth: true,
            changeYear: true,
            minDate: "-60Y",
            maxDate: "-17Y",
        });
    Thread Starter user10522three

    (@zorrohere)

    EDIT: duplicate post.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Setting date limit’ is closed to new replies.