NativeScript / NativeScript/plugins

[@nativescript/datetimepicker] Android Datepicker returns March when February is selected

Open
#60 3 comments 1 reaction 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

As mentioned in the title, when we select the month as february, march is returned regardless of the date and the year. We have updated and downgraded the version of the plugin, but the bug still persist

This is the code that we have

DateTimePicker.pickDate({​​​​​​​​
    context:args.object._context,
    title:global.dateTimePickerTitle(),
      }​​​​​​​​)
        .then((result) => {​​​​​​​​
            // "2021-03-27T16:00:00.000Z" is returned instead of "2021-02-27T16:00:00.000Z" when we selected 27 february 2021
            console.log(JSON.stringify(result)); 
        });

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 by reproducing the February selection on Android with the supplied DateTimePicker.pickDate example, then trace the datetimepicker Android implementation. Done means selecting February returns a February date rather than March, including for the shown 2021-02-27 case.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
mobile-dev
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.