Tuesday, 6 August 2013

Angular strap datepicker dynamic startDate/endDate

Angular strap datepicker dynamic startDate/endDate

I have a scenario where I have a "parent" datepicker and a bunch of
"child" datepickers, all within the same view. I will need to update the
child pickers to be limited by the parent's date and the parent picker
will need to be governed by the highest child date. I've tried setting
this on the children pickers:
//child pseudo-code
<input data-date-end-date="parent.target_date"
data-ng-model="child.target_date bs-datepicker />
//parent pseudo-code
<input data-date-start-date="highestChild.target_date"
data-ng-model="child.target_date bs-datepicker />
but i just get a picker without the ability to select anything.
essentially a child should not be able to be put out passed it's parent
and a parent can't be pulled in closer than it's highest child, but they
all need to be able to update.

No comments:

Post a Comment