• Resolved mitdrissia

    (@mitdrissia)


    Hi, i am using youtr spectra form with the date picker but i want to only have it show one date per month.

    I tried this javascript code:

    function custom_datepicker_script() {
        ?>
        <script>
            jQuery(function ($) {
                // Specify the date you want to enable per month
                var enabledDate = "22/11/2023";
    
                // Disable the datepicker on the desired elements
                $(".uagb-forms-date-input[name='4f6b2f74']").datepicker({
                    dateFormat: "dd/mm/yy",
                    beforeShowDay: function (date) {
                        var formattedDate = $.datepicker.formatDate("dd/mm/yy", date);
                        if (formattedDate === enabledDate) {
                            return [true, ""];
                        }
                        return [false, ""];
                    }
                });
            });
        </script>
        <?php
    }

    i am using wp code which is like code snippets. This can add javascript to the specific page. For the class i used: uagb-forms-date-input[name=’4f6b2f74′] (without the dot) but i can get it to work. Can you show me how to do this? thank you

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @mitdrissia,

    Thanks for getting in touch with us.

    I am afraid we can’t help with the custom code. It is out of support scope. I would suggest you hire a freelancer.

    Have a nice day!

Viewing 1 replies (of 1 total)
  • The topic ‘spectra form date picker only show one date’ is closed to new replies.