jQuery(document).ready(function () {
            jQuery('.geodir_advance_search_widget form').each(function(index, obj){
                var $form = jQuery(this);
                jQuery(".sevent", $form).datepicker({
                    changeMonth: true,
                    changeYear: true,
                    dateFormat: 'MM d, yy'
                });

                jQuery(".sminevent", $form).datepicker({
                    changeMonth: true,
                    changeYear: true,
                    dateFormat: 'MM d, yy',
                    onClose: function (selectedDate) {
                        jQuery(".smaxevent", $form).datepicker("option", "minDate", selectedDate);
                    }
                });

                jQuery(".smaxevent", $form).datepicker({
                    changeMonth: true,
                    changeYear: true,
                    dateFormat: 'MM d, yy'
                });
            });
        });