Skip to content

Commit

Permalink
updating upstream libraray. fixes #20 ("drops" prop isn't working)
Browse files Browse the repository at this point in the history
and fixes #21 (disable calendars)
  • Loading branch information
skratchdot committed Jul 19, 2015
1 parent 2168a5f commit 9c347e8
Show file tree
Hide file tree
Showing 7 changed files with 1,097 additions and 1,070 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ var someReactComponent = React.createClass({
});
```

3) Include the daterangepicker CSS in your project somewhere. The CSS file is here: [daterangepicker-bs3.css](https://raw.githubusercontent.com/skratchdot/react-bootstrap-daterangepicker/master/css/daterangepicker-bs3.css) (don't hotlink- download and host your own copy)
3) Include the daterangepicker CSS in your project somewhere. The CSS file is here: [daterangepicker.css](https://raw.githubusercontent.com/skratchdot/react-bootstrap-daterangepicker/master/css/daterangepicker.css) (don't hotlink- download and host your own copy)

```html
<link rel="stylesheet" href="daterangepicker-bs3.css" type="text/css" />
<link rel="stylesheet" href="daterangepicker.css" type="text/css" />
```

## Documentation
Expand All @@ -46,8 +46,8 @@ For in depth documentation, see the original
You can pass all the same props as the original plugin:

- **startDate, endDate, minDate, maxDate, dateLimit, timeZone, showDropdowns, showWeekNumbers,
timePicker, timePickerIncrement, timePicker12Hour, timePickerSeconds, ranges, opens, buttonClasses,
applyClass, cancelClass, format, separator, locale, singleDatePicker, parentEl**
timePicker, timePickerIncrement, timePicker24Hour, timePickerSeconds, ranges, opens, drops,
buttonClasses, applyClass, cancelClass, locale, singleDatePicker, parentEl**

You can listen to the following 7 events:

Expand Down
308 changes: 155 additions & 153 deletions css/daterangepicker-bs3.css → css/daterangepicker.css
Original file line number Diff line number Diff line change
@@ -1,134 +1,12 @@
/*!
* Stylesheet for the Date Range Picker, for use with Bootstrap 3.x
*
* Copyright 2013-2015 Dan Grossman ( http://www.dangrossman.info )
* Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
*
* Built for http://www.improvely.com
*/

.daterangepicker.dropdown-menu {
max-width: none;
z-index: 3000;
}

.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {
float: left;
margin: 4px;
}

.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar,
.daterangepicker.openscenter .ranges, .daterangepicker.openscenter .calendar {
float: right;
margin: 4px;
}

.daterangepicker.single .ranges, .daterangepicker.single .calendar {
float: none;
}

.daterangepicker .ranges {
width: 160px;
text-align: left;
}

.daterangepicker .ranges .range_inputs>div {
float: left;
}

.daterangepicker .ranges .range_inputs>div:nth-child(2) {
padding-left: 11px;
}

.daterangepicker .calendar {
display: none;
max-width: 270px;
}

.daterangepicker.show-calendar .calendar {
display: block;
}

.daterangepicker .calendar.single .calendar-date {
border: none;
}

.daterangepicker .calendar th, .daterangepicker .calendar td {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
white-space: nowrap;
text-align: center;
min-width: 32px;
}

.daterangepicker .daterangepicker_start_input label,
.daterangepicker .daterangepicker_end_input label {
color: #333;
display: block;
font-size: 11px;
font-weight: normal;
height: 20px;
line-height: 20px;
margin-bottom: 2px;
text-shadow: #fff 1px 1px 0px;
text-transform: uppercase;
width: 74px;
}

.daterangepicker .ranges input {
font-size: 11px;
}

.daterangepicker .ranges .input-mini {
border: 1px solid #ccc;
border-radius: 4px;
color: #555;
display: block;
font-size: 11px;
height: 30px;
line-height: 30px;
vertical-align: middle;
margin: 0 0 10px 0;
padding: 0 6px;
width: 74px;
}

.daterangepicker .ranges ul {
list-style: none;
margin: 0;
padding: 0;
}
/**
* A stylesheet for use with Bootstrap 3.x
* @author: Dan Grossman http://www.dangrossman.info/
* @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved.
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
* @website: https://www.improvely.com/
*/

.daterangepicker .ranges li {
font-size: 13px;
background: #f5f5f5;
border: 1px solid #f5f5f5;
color: #08c;
padding: 3px 12px;
margin-bottom: 8px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
cursor: pointer;
}

.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover {
background: #08c;
border: 1px solid #08c;
color: #fff;
}

.daterangepicker .calendar-date {
border: 1px solid #ddd;
padding: 4px;
border-radius: 4px;
background: #fff;
}

.daterangepicker .calendar-time {
text-align: center;
margin: 8px auto 0 auto;
line-height: 30px;
}
/* Container Appearance */

.daterangepicker {
position: absolute;
Expand All @@ -137,8 +15,6 @@
left: 20px;
padding: 4px;
margin-top: 1px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}

Expand Down Expand Up @@ -235,6 +111,76 @@
border-top: 6px solid #fff;
}

.daterangepicker.dropdown-menu {
max-width: none;
z-index: 3000;
}

.daterangepicker .ranges, .daterangepicker .calendar {
float: left;
}

.daterangepicker.single .ranges, .daterangepicker.single .calendar {
float: none;
}

.daterangepicker .ranges {
margin: 4px;
text-align: left;
}

.daterangepicker .calendar {
display: none;
max-width: 270px;
}

.daterangepicker.show-calendar .calendar {
display: block;
}

.daterangepicker .calendar.single .calendar-table {
border: none;
}

/* Calendars */

.daterangepicker .calendar th, .daterangepicker .calendar td {
white-space: nowrap;
text-align: center;
min-width: 32px;
}

.daterangepicker .calendar-table {
border: 1px solid #ddd;
padding: 4px;
border-radius: 4px;
background: #fff;
}

.daterangepicker .calendar.left .calendar-table {
border-right: none;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.daterangepicker .calendar.right .calendar-table {
border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

.daterangepicker .calendar.left {
margin: 4px 0 4px 4px;
}

.daterangepicker .calendar.right {
margin: 4px 4px 4px 0;
}

.daterangepicker .calendar.left .calendar-table {
padding-right: 12px;
}

.daterangepicker table {
width: 100%;
margin: 0;
Expand All @@ -244,51 +190,42 @@
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
cursor: pointer;
white-space: nowrap;
cursor: pointer;
}

.daterangepicker td.off {
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
color: #999;
background: #fff;
}

.daterangepicker td.disabled, .daterangepicker option.disabled {
color: #999;
}

.daterangepicker td.available:hover, .daterangepicker td.available.today, .daterangepicker th.available:hover {
.daterangepicker td.available:hover, .daterangepicker th.available:hover {
background: #eee;
}

.daterangepicker td.in-range {
background: #ebf4f8;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}

.daterangepicker td.start-date {
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}

.daterangepicker td.end-date {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}

.daterangepicker td.start-date.end-date {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}

.daterangepicker td.today.active, .daterangepicker td.active, .daterangepicker td.active:hover {
.daterangepicker td.active, .daterangepicker td.active:hover {
background-color: #357ebd;
border-color: #3071a9;
color: #fff;
Expand Down Expand Up @@ -321,15 +258,80 @@
margin-bottom: 0;
}

.daterangepicker_start_input {
float: left;
.daterangepicker th.month {
width: auto;
}

.daterangepicker_end_input {
float: left;
padding-left: 11px
/* Text Input Above Each Calendar */

.daterangepicker .input-mini {
border: 1px solid #ccc;
border-radius: 4px;
color: #555;
display: block;
height: 30px;
line-height: 30px;
vertical-align: middle;
margin: 0 0 5px 0;
padding: 0 6px 0 28px;
width: 100%;
}

.daterangepicker th.month {
width: auto;
.daterangepicker .daterangepicker_input i {
position: absolute;
left: 8px;
top: 8px;
}

.daterangepicker .left .daterangepicker_input {
padding-right: 12px;
}

.daterangepicker .daterangepicker_input {
position: relative;
}

/* Time Picker */

.daterangepicker .calendar-time {
text-align: center;
margin: 5px auto;
line-height: 30px;
position: relative;
padding-left: 28px;
}

.daterangepicker .calendar-time select.disabled {
color: #ccc;
cursor: not-allowed;
}

/* Predefined Ranges */

.daterangepicker .ranges {
font-size: 11px;
}

.daterangepicker .ranges ul {
list-style: none;
margin: 0;
padding: 0;
width: 160px;
}

.daterangepicker .ranges li {
font-size: 13px;
background: #f5f5f5;
border: 1px solid #f5f5f5;
color: #08c;
padding: 3px 12px;
margin-bottom: 8px;
border-radius: 5px;
cursor: pointer;
}

.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover {
background: #08c;
border: 1px solid #08c;
color: #fff;
}
Loading

0 comments on commit 9c347e8

Please sign in to comment.