You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -372,7 +376,9 @@ <h4>Every time you click the button, the selectable attribute is toggled.</h4>
372
376
373
377
<p><code>renderOn: 'valid-dates-changed'</code> to cause the directive to re-render.</p>
374
378
375
-
<p><buttonclass="btn btn-default" data-ng-click="renderOnClick()">Click me to re-render</button></p>
379
+
<p>
380
+
<buttonclass="btn btn-default" data-ng-click="renderOnClick()">Click me to re-render</button>
381
+
</p>
376
382
377
383
<divclass="well">
378
384
@@ -384,8 +390,65 @@ <h4>Every time you click the button, the selectable attribute is toggled.</h4>
384
390
</div>
385
391
386
392
</div>
387
-
</div>
388
393
394
+
<divclass="row">
395
+
<divclass="col-sm-6">
396
+
<h3>Date range picker</h3>
397
+
<h4>Every time you select a start date, dates before the start date are disabled in the end date.</h4>
398
+
399
+
<p>This is a little more complex than the other examples.</p>
400
+
<p><strong>Start Date:</strong><code>renderOn: 'end-date-changed'</code> to cause the directive to re-render when the end date changes,
401
+
and <code>data-on-set-time="startDateOnSetTime()"</code> to broadcast when the start date changes,
402
+
and finally <code>data-before-render="beforeRenderStartDate($dates)"</code>
403
+
to disable the dates after the selected end date.</p>
404
+
405
+
<p><strong>End Date:</strong><code>renderOn: 'start-date-changed'</code> to cause the directive to re-render when the start date changes,
406
+
and <code>data-on-set-time="endDateOnSetTime()"</code> to broadcast when the end date changes,
407
+
and finally <code>data-before-render="beforeRenderEndDate($view, $dates, $leftDate, $upDate, $rightDate)"</code>
408
+
to disable the dates before the selected start date.</p>
409
+
410
+
<p>NB: It is possible that data coming from the server (or via a defect in the controller) that the start date is after the end date.
411
+
To allow the user to get themselves out of this situation, your implementation might not disable any dates if the start date is greater than the end date.
0 commit comments