capacitor-community / capacitor-community/date-picker

Date is offset by 1 in current month

Open
#87 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
94
Forks
30
PR merge metrics
No merged PRs in 30d

Description

**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](https://github.com/user-attachments/assets/0560b8e4-bfe7-45c2-a456-d38bcab2f62e)
![1A762832-EA54-41A0-BD3E-C956DE1F9FF2](https://github.com/user-attachments/assets/ed95a19d-0b5b-4b2a-8ee0-27f5b5c213dc)
![128EAC10-9888-4FB3-93A9-82BBA9304C01](https://github.com/user-attachments/assets/0e1e6e65-4209-4732-a5fa-b0d8cce32011)

**Smartphone (please complete the following information):**
- Device: iphone16
- OS: 17.5
- Browser safari
- Version 22

**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))),
});
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided DatePicker configuration on the stated iPhone/Safari setup, then inspect the iOS date-picker integration and its timezone or date-format handling. Done means selecting dates around the end of a month returns the same calendar date, including 30 July, 31 July, and 1 August.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.