Topic: The datetimepicker does not populate the input field on selection

matrioshkaltd free asked 2 years ago


Expected behavior: Selecting a date and time and clicking OK inserts the selected value into the input field

Actual behavior: Selecting a date and time and clicking OK does not insert the selected value into the input field

This happens in the documentation example "Basic example" here: https://mdbootstrap.com/docs/standard/forms/datetimepicker/

...here: https://mdbootstrap.com/snippets/standard/matrioshkaltd/3166687

...and also with a created snippet using the default example code which is:

<div class="form-outline datetimepicker">
  <input
    type="text"
    class="form-control"
    value="22/12/2020, 14:12:56"
    id="datetimepickerExample"
  />
  <label for="datetimepickerExample" class="form-label"
    >Select Date and Time</label
  >
</div>

UNNdev priority commented 2 years ago

It works for me in Chrome.


matrioshkaltd free commented 2 years ago

It is actually not working for me here in Brave, Firefox or Chrome.


Michał Duszak staff commented 2 years ago

Check if you can reproduce this: after selecting a year you select a month. Then the days view shows, and you must choose a day in the calendar. Otherwise the value wouldn't be inserted. Is it working for you if you select a day on the last view of datepicker?


matrioshkaltd free commented 2 years ago

Hi, yes in that sequence it works. I understand the process now. I had been choosing a date, then clicking the clock icon to switch to the time selector, choosing a time and then clicking OK. If you do that, the dialog closes and no values are updated/inserted into the input field. It appears I need to click OK on the date after selecting to move to the time selector, choose a time and click OK again to close and update. Perhaps a change so that if a date has been selected, clicking the clock icon works as if you'd clicked OK. It could be just me, but intuitively clicking OK I expect the dialog to close and submit what has been selected so far, hence me clicking the clock icon to then choose the time. I hope I have explained that clearly. Thanks for your help, it is much appreciated.


Michał Duszak staff commented 2 years ago

I have put it into discussion with the team, so we can work on a best solution. Thank you for your feedback.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.1
  • Device: PC
  • Browser: Brave
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes
Tags