<select onchange="
         var current_value = this.value;
        $(`<?php echo $date_picker_parent; ?> input[name=<?php echo $input_field_name ?>]`).val('');
        var currentdate = new Date();
        var default_date = currentdate.getDate();
        if (current_value) {
           default_date = currentdate.getDate() + parseInt(current_value)
            
        }
        var new_date = currentdate.setDate(default_date);
        var date = moment(new_date).format(`YYYY-MM-DD`);
        $(`<?php echo $date_picker_parent; ?> .<?php echo $date_picker_class; ?>`).datepicker(`update`, date);        
        "
    
    name="<?php echo $name ?>" class="<?php echo $class_name; ?>" id="<?php echo $id_name; ?>">
    <option value="">Please select</option>
    <?php foreach(DATE_SELECTION_BY_DAYS as $key => $day){ ?>
    <option value="<?php echo $key ?>"><?php echo $day ?></option>
    <?php } ?>
</select>


