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

DateTimer format24hr() doesn't work #2742

Closed
plamenradev opened this issue Nov 2, 2023 · 4 comments
Closed

DateTimer format24hr() doesn't work #2742

plamenradev opened this issue Nov 2, 2023 · 4 comments
Assignees
Labels

Comments

@plamenradev
Copy link

Describe the bug
When using DateTimer field format24hr(true) method does nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Create DateTimer field
DateTimer::make('open')
  ->title('Opening date')
  ->enableTime()
  ->format24hr()

Expected behavior
Time format in 24 hours instead of AM/PM

Desktop (please complete the following information):

  • OS: MacOS Monterey 12.6
  • Browser: Chrome
  • Version: 118.0.5993.88 (Official Build) (arm64)

Server (please complete the following information):

  • Platfrom Version: 13.10.0
  • Laravel Version: 9.52.9
  • PHP Version: 8.1.9
@BrianWendt
Copy link

I don't fully understand the Stimulus controller stuff yet to know why, but it seems at line 47 of vendor\orchid\platform\resources\js\controllers\datetime_controller.js that the key for "time_24hr", "maxDate", "minDate", and "allowEmpty" come back as false.
"allowEmpty" doesn't appear to be a supported option on flatpickr in the recent versions but the other 3 do appear to be valid options. Other options like "enableTime" and "dateFormat" are working as expected.

Sorry that I don't have a solution, but that is what I've discovered so far.

@lihe6666
Copy link
Contributor

image

Yes, you are right. I will follow up on this issue.

lihe6666 added a commit to lihe6666/platform that referenced this issue Dec 19, 2023
lihe6666 added a commit to lihe6666/platform that referenced this issue Dec 19, 2023
@lihe6666
Copy link
Contributor

lihe6666 commented Dec 19, 2023

1702964945480

#2775

@lihe6666
Copy link
Contributor

@plamenradev This problem can be closed

@tabuna tabuna closed this as completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants