Skip to content

Commit fba7dc4

Browse files
committed
Bump version, add missing docs
1 parent a244c4d commit fba7dc4

File tree

4 files changed

+72
-4
lines changed

4 files changed

+72
-4
lines changed

daterangepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @version: 3.0.1
2+
* @version: 3.0.2
33
* @author: Dan Grossman http://www.dangrossman.info/
44
* @copyright: Copyright (c) 2012-2018 Dan Grossman. All rights reserved.
55
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php

package.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'dangrossman:bootstrap-daterangepicker',
3-
version: '3.0.1',
3+
version: '3.0.2',
44
summary: 'Date range picker component',
55
git: 'https://github.com/dangrossman/daterangepicker',
66
documentation: 'README.md'

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "daterangepicker",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Date range picker component for Bootstrap",
55
"main": "daterangepicker.js",
66
"style": "daterangepicker.css",

website/index.html

+69-1
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,74 @@ <h1 style="margin-top: 30px"><a id="options" href="#options">Options</a></h1>
411411
</li>
412412
</ul>
413413

414+
<h1 style="margin-top: 30px"><a id="methods" href="#methods">Methods</a></h1>
415+
416+
<p>
417+
You can programmatically update the <code>startDate</code> and <code>endDate</code>
418+
in the picker using the <code>setStartDate</code> and <code>setEndDate</code> methods.
419+
You can access the Date Range Picker object and its functions and properties through
420+
data properties of the element you attached it to.
421+
</p>
422+
423+
<script src="https://web.archive.org/web/20180303234927js_/https://gist.github.com/dangrossman/8ff9b1220c9b5682e8bd.js"></script>
424+
425+
<br/>
426+
427+
<ul class="nobullets">
428+
<li>
429+
<code>setStartDate(Date or string)</code>: Sets the date range picker's currently selected start date to the provided date
430+
</li>
431+
<li>
432+
<code>setEndDate(Date or string)</code>: Sets the date range picker's currently selected end date to the provided date
433+
</li>
434+
</ul>
435+
436+
<p style="margin: 0"><b>Example usage:</b></p>
437+
438+
<script src="https://web.archive.org/web/20180303234927js_/https://gist.github.com/dangrossman/e1a8effbaeacb50a1e31.js"></script>
439+
440+
<h1 style="margin-top: 30px"><a id="events" href="#events">Events</a></h1>
441+
442+
<p>
443+
Several events are triggered on the element you attach the picker to, which you can listen for.
444+
</p>
445+
446+
<ul class="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:
470+
</p>
471+
472+
<script src="https://web.archive.org/web/20180303234927js_/https://gist.github.com/dangrossman/1bea78da703f2896564d.js"></script>
473+
474+
<br/>
475+
476+
<p>
477+
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:
478+
</p>
479+
480+
<script src="https://web.archive.org/web/20180303234927js_/https://gist.github.com/dangrossman/0c6c911fea1459b5fd13.js"></script>
481+
414482
<h1 style="margin-top: 30px"><a id="config" href="#config">Configuration Generator</a></h1>
415483

416484
<div class="well configurator">
@@ -616,7 +684,7 @@ <h2 style="margin-bottom: 15px">Your Configuration to Copy</h2>
616684

617685
<!-- License -->
618686

619-
<h1 style="margin-top: 30px"><a id="config" href="#license">License</a></h1>
687+
<h1 style="margin-top: 30px"><a id="license" href="#license">License</a></h1>
620688

621689
<p>The MIT License (MIT)</p>
622690

0 commit comments

Comments
 (0)