Skip to content

DatePicker setting seconds when showTime is true and showSeconds is false #8140

Description

@LouisTrinczek

Describe the bug

When showSeconds is false but showTime is true, seconds should be set to zero and not set to the current time seconds.

Same bug as for primeng primefaces/primeng#18567

Reproducer

https://stackblitz.com/edit/vitejs-vite-etgryuao?file=src%2FApp.tsx

System Information

no importance

Steps to reproduce the behavior

Click on Calendar, select any date and look at the preview string below

Expected behavior

I'd expect, that when no showSeconds is set, the date is formatted to for example 12:50:00, and not 12:50:23 (or whatever seconds are in that moment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIssue contains a defect related to a specific component.

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions