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

Revature Pro priority asked 4 years 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; } <<<

Arkadiusz Idzikowski staff answered 4 years ago


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? Best, Arek

Revature Pro priority commented 4 years 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 staff commented 4 years 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. Best, Arek


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

  • User: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags