Topic: TimePicker default now for 12:00 hour showing AM instead of PM

Jared4178 free asked 4 years ago


Expected behavior default="now" Using 12-hour format. For the 12:00 hour it should default to PM.

Actual behavior If the current time is between 12:00 and 12:59PM the time picker is showing AM instead of PM. This can be replicated by setting the default="12:01". The timepicker will show 12:12 AM, it should show 12:12 PM.

Resources (screenshots, code snippets etc.)

Start Time
      <input name="startTime" type="text" class="form-control" id="startTime" required>
      <i></i>
  </div>

Krzysztof Wilk staff commented 4 years ago

Hi!

Thank you for reporting this problem. We'll try to fix it as soon as possible.

Best regards


Andrew Sonnenschein priority commented 2 years ago

I am still seeing this same bug now. If I take your "with string PM" example on TimePicker page, https://mdbootstrap.com/docs/standard/forms/timepicker, and initialise with a 12 hour time like this:

const pickerStartedPM = document.querySelector('.timepicker-default-time-string-pm ');const tmStartedPM = new mdb.Timepicker(pickerStartedPM, { defaultTime: '12:12 PM'});

It displays AM. Same issue that was reported to you 2 YEARS AGO? Why was this not fixed yet? Is there a workaround?


Mikołaj Smoleński staff commented 2 years ago

@Andrew Sonnenschein you're writing about a completely different project. Jared described an issue with MDB4 jQuery package, you wrote about MDB5 Standard UI KIT. Please open a new ticket in the correct category.

Keep coding!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: Laptop
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No