Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar: timeOnly Today button should be Now #5722

Closed
akmere opened this issue Jan 10, 2024 · 5 comments · Fixed by #5797
Closed

Calendar: timeOnly Today button should be Now #5722

akmere opened this issue Jan 10, 2024 · 5 comments · Fixed by #5797
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@akmere
Copy link

akmere commented Jan 10, 2024

Describe the bug

image
Hello! The issue is with timeOnly and showButtonBar attributes for Calendar. 'Clear' button works as expected, but there is no use of 'Today' button that always sets time to 00:00. It could be replaced with something like 'Now' setting time to current time.

Reproducer

No response

PrimeReact version

10.2.1

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a calendar with timeOnly and showButtonBar attributes set to true
  2. Try to change time
  3. Click "Today" button to check what happens

Expected behavior

There is 'Now' button which sets to the current time

@akmere akmere added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 10, 2024
@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 10, 2024

This comment was marked as resolved.

@melloware melloware added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Reproducer Issue needs a runnable reproducer labels Jan 15, 2024
@melloware melloware changed the title Calendar: timeOnly and showButtonBar attributes don't work nice together Calendar: timeOnly Today button should be Now Jan 15, 2024
@kl-nevermore
Copy link
Contributor

kl-nevermore commented Jan 17, 2024

@melloware
What do you think should be displayed when clearbutton is clicked?

  • 00:00
  • first value(11:18)
  • avtive value(18:18)

It looks strange now.
20240117112138_rec_

https://stackblitz.com/edit/k5kfdw?file=src%2FApp.jsx

@melloware
Copy link
Member

Clear should be 00:00 I think.

@melloware
Copy link
Member

Actually clear should be NOW.

@melloware
Copy link
Member

Also I should mention there is already a LocaleOption for localizing the word "Now" it was added because PrimeFaces already supports this feature: primefaces/primefaces#10754

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants