• Resolved Buschtrommel



    I used this script to count the days:

     * Modify WPForms Date/Time field date picker to accept a range of dates.
     * @link https://wpforms.com/developers/allow-date-range-or-multiple-dates-in-date-picker/
    function wpf_dev_date_picker_range() {
        <script type="text/javascript">
            window.wpforms_datepicker = {
                mode: "range",
                 onClose: function(selectedDates, dateStr, instance) {
                  var daysInRange = document.getElementsByClassName('inRange');
                     var totalDays = daysInRange.length+2;
                                     alert("Min 7 Days Required");
    add_action( 'wpforms_wp_footer', 'wpf_dev_date_picker_range' );

    Its fine. But when I try to maximum the day to 30, the problem is, that the days are in the next month, and the script only count the visible days.

    any idea?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Count Range days over the month’ is closed to new replies.