NativeScript / NativeScript/plugins
[@nativescript/datetimepicker] DateTimePicker resets date if set first after setting time
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 123
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 1
Description
I'm using the DateTimePicker component in my application and found a potential bug.
- Setting time field first, it auto sets the date field on the current date. Updating the date field works.
- Setting date field first, it sets the date field and leaves time blank. Setting the time field now, RESETS date field to current day.
There is a property called autoPickTime which defaults to false. I guess thats the reason why setting date does not set the time.
It would be nice to have similar property autoPickDate to prevent overwritting the date or at least check for a set date.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the @nativescript/datetimepicker component and reproduce both field-setting sequences described in the issue. Check the existing autoPickTime behavior and verify that setting a date before a time no longer replaces the selected date with the current day; the behavior should be covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100