Closed Alkasih closed 7 years ago
You should initialize your model value to 00:00
in your controller. The picker is not choosing any values on its own, but always uses ng-model
. The only exception is when ng-model
is not a valid Date
instance, it is set to new Date()
.
The ng-model has value 10:15 perfectly in console log, but when I click it to edit, the pop up start the time as the current time in my dekstop computer which is 1:41
Please help me to fix it. Please...
Only Date
instances are supported as model values.
Here is the code pen when I change the model to H:mm
For this project what I need is only hour and minutes, so I don't need date to input. Any idea to help me please?
new Date(0, 0, 0, 10, 15)
var mytime = '12:30'; new Date(0, 0, 0, 10, 15);
How do I convert it?
new Date(0, 0, 0, 12, 30)
:D It is so static. It should be dynamic.
Sorry but this is super simple task for any, even sub-par programmer. Do you want to hire me?
It is ok, I can handle it.
I am sorry, I have one more question please. It is so wierd when the popup showing the current datetime when I need to edit it. How to make it only 00:00 if the value is not set yet, and only show the real value if it has been set, so it doesn't look for the curent datetime.
Thank you very much