dateRangePicker js maxSpan when I select the second date the time automatically becomes 00:00 as it will solve

$(dateRangePicker).daterangepicker({
    opens: 'center',
    drops: 'down',
    autoUpdateInput: false,
    timePicker: true,
    timePicker24Hour: true,
    maxSpan: {
        days: 6
    },
    startDate: moment().startOf('day'),
    endDate: moment().endOf('day'),
    alwaysShowCalendars: true,
    applyButtonClasses: "btn-success",
    locale: {
        cancelLabel: 'Clear',
        format: 'DD-MM-YYYY HH:mm'
    }
});

$(dateRangePicker).on('apply.daterangepicker', function (ev, picker) {
    this.value = picker.startDate.format('DD-MM-YYYY HH:mm') + ' - ' + picker.endDate.format('DD-MM-YYYY HH:mm');
});

$(dateRangePicker).on('cancel.daterangepicker', function (ev, picker) {
    this.value = '';
    picker.setStartDate(moment().startOf('day'));
    picker.setEndDate(moment().endOf('day'));
});

moment().endOf(‘day’) here the time is set to 23:59 but maxSpan when you select the last day of the week the time automatically becomes 00:00

minDate maxDate tried and didn’t work