I'm having some trouble understanding the docs for the date picker component.
What I understand:
[(bsValue)]
should be set to the variable on the controller that I want to fill with a Date objectbsDatepicker
is the directive that makes it a date pickerWhat I don't understand:
#dp=bsDatepicker
is for/does(click)=dp.toggle()
throws an error about the property toggle of undefined being called, but it does work!I do understand that the spec for this isn't final, but what are these properties and what are they supposed to do?
#dp=bsDatepicker
is to set a template variable dp
to the directive bsDatepicker
. It basically gives the db
variable reference to bsDatePicker
type so it has access to bsDatePicker
methods and stuffs. Then on button (click)
event, you assign dp.toggle()
so that the button will toggle the DatePicker. I hope I am making sense.