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
Several events are triggered on the element you attach the picker to, which you can listen for.
444
+
</p>
445
+
446
+
<ulclass="nobullets">
447
+
<li>
448
+
<code>show.daterangepicker</code>: Triggered when the picker is shown
449
+
</li>
450
+
<li>
451
+
<code>hide.daterangepicker</code>: Triggered when the picker is hidden
452
+
</li>
453
+
<li>
454
+
<code>showCalendar.daterangepicker</code>: Triggered when the calendar(s) are shown
455
+
</li>
456
+
<li>
457
+
<code>hideCalendar.daterangepicker</code>: Triggered when the calendar(s) are hidden
458
+
</li>
459
+
<li>
460
+
<code>apply.daterangepicker</code>: Triggered when the apply button is clicked,
461
+
or when a predefined range is clicked
462
+
</li>
463
+
<li>
464
+
<code>cancel.daterangepicker</code>: Triggered when the cancel button is clicked
465
+
</li>
466
+
</ul>
467
+
468
+
<p>
469
+
Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event:
While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed:
0 commit comments