v0ltoz / react-datetimepicker

MIT License
91 stars 69 forks source link

ApplyCallback endTime one month behind #67

Closed Sub-Zero-1 closed 2 years ago

Sub-Zero-1 commented 2 years ago

Hi,

        <DateTimeRangeContainer
          ranges={ranges}
          start={startDate}
          end={endDate}
          local={local}
          maxDate={maxDate}
          applyCallback={dateTimeCallback}
          smartMode
        >
  const dateTimeCallback = (newStartDate, newEndDate) => {
    console.log('got here with newStartDate:', newStartDate);
    console.log('got here with newEndDate:', newEndDate);
  }

Somehow, I always get the newEndDate back which is one month behind the selected end month and I don't understand why. So, when I select e.g. Dezember 2020 and press "apply" I get in return November 2020.

Sub-Zero-1 commented 2 years ago

The selection process is horrible.