Sitelet https://web.archive.org/web/20260604043904/https://github.com/NativeScript/NativeScript/issues/8941
Skip to content

TimePicker: Selecting 12am time doesn't work #8941

@nevendyulgerov

Description

@nevendyulgerov

Environment

  • CLI: 6.5.1
  • Android Runtime: 29
  • Plugin(s): None

Describe the bug
When setting time like 12:07 AM (equal to 00:07 in 24h format) the timepicker displays an incorrect time. Also it displays PM instead of AM.

To Reproduce
Just test the following in yyyy-MM-dd hh:mm aa format:

<TimePicker :time="new Date('2020-10-06 12:07 AM')" />

or using format yyyy-MM-dd HH:mm

<TimePicker :time="new Date('2020-10-06 00:07')" />

Expected behavior
The timepicker should be set to 12:07 AM:
timepicker-expected-result

Actual behavior
The timepicker is set to 01:07 PM:
timepicker-actual-result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions