NativeScript / NativeScript/plugins

[@nativescript/datetimepicker] Bug in datetimepicker callback showing false date

Open
#568 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

Issue Summary:
The DateTimePicker in Android is exhibiting unexpected behavior when selecting a date in February. The callback is returning a date in the following month instead of the selected date.

Steps to Reproduce:

  1. Open the app. https://stackblitz.com/edit/nativescript-stackblitz-templates-knotdp?file=src%2Fapp%2Fitem%2Fitems.component.ts
  2. Click on the start date to open the DateTimePicker.
  3. Select any date in February.

Expected Behavior:
The callback should return the selected date accurately.

Actual Behavior:
The callback returns a date in the next month instead of the selected date.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the StackBlitz reproduction at src/app/item/items.component.ts and reproduce the Android DateTimePicker callback issue for a February date. Trace the datetimepicker callback from that entry point and verify completion when the callback returns the selected date rather than the following month.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.