[Angular] time-picker can't set placeholder time or bind

sreenathb@revature.com asked 3 months ago

Angular's mdb-time-picker component won't render when I set a placeholder time. Also having difficulty w/data binding to the time component. The date component seems to be fine.

I'm using the 12-hour clock and the dark theme if that helps. I am also styling the date and time picker as follows:


.picker__calendar-container, .picker__date-display, clockpicker-am-pm-block, .darktheme .picker__box {
background-color: $primary-color-dark !important;


Dear mary.carns,

I tried to recreate the problem but everything seems to work properly. I need a bit more information to help you. Could you show me any code samples/screenshots? Also are there any errors in your console?

What is the exact problem with data binding?



mary.carns@revature.com commented 3 months ago

Thanks Arek. The time picker is in a modal and the placeholder is bound to a variable. The variable shows when the time picker is not clicked, but when clicked the clock defaults to 12:00PM and not to the variable like I expected.

I have tried to put in a default time in the time picker and the page won't load, I get an "unexpected token" error when I try to put in a default time as 9:00AM or 9AM. I am using the 12-hour clock, and the data that's being referenced is also using a 12-hour time format.

I've been using "today" as placeholder in the date picker, by contrast, and that works like it should (defaults to today).

I hope that helps explain, thanks.

Arkadiusz Idzikowski commented 2 months ago

Dear mary.carns,

Looks like I misunderstood your first post. There are some problems with that behaviour that we need to fix. Thanks for reporting them.


Please insert min. 20 characters.


Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No