capacitor-community / date-picker

Native DateTime Picker Plugin for Capacitor Apps
MIT License
87 stars 29 forks source link

Date is offset by 1 in current month #87

Open roboter opened 1 month ago

roboter commented 1 month ago

Describe the bug Date is offset by 1 day in current month.

To Reproduce Steps to reproduce the behavior: open datepicker when selected: 30 july - it is 31 july 31 goes to 1 august but 1 august is still 1 august

Expected behavior concise date on all months

Screenshots 9FBDE06C-0720-47B1-8EC7-9998B2F74158 1A762832-EA54-41A0-BD3E-C956DE1F9FF2 128EAC10-9888-4FB3-93A9-82BBA9304C01

Smartphone (please complete the following information):

Additional context

const pickerResult = await DatePicker.present({
          timezone: 'GMT+2',
          format: 'yyyy-MM-dd',
          date: this.formatISO(new Date()),
          ios: {
            style: "wheels",
            format: 'yyyy-MM-dd',
          },
          mode: 'date',
          min: this.formatISO(new Date()),
          max: this.formatISO(new Date(this.addDays(13))),
        });
roboter commented 1 month ago

I commented out timezone: 'GMT+2', to fix