@@ -12,7 +12,25 @@ var _reactDom = require('react-dom');
12
12
13
13
var _reactDom2 = _interopRequireDefault ( _reactDom ) ;
14
14
15
- var _reactBootstrap = require ( 'react-bootstrap' ) ;
15
+ var _Button = require ( 'react-bootstrap/lib/Button' ) ;
16
+
17
+ var _Button2 = _interopRequireDefault ( _Button ) ;
18
+
19
+ var _FormControl = require ( 'react-bootstrap/lib/FormControl' ) ;
20
+
21
+ var _FormControl2 = _interopRequireDefault ( _FormControl ) ;
22
+
23
+ var _InputGroup = require ( 'react-bootstrap/lib/InputGroup' ) ;
24
+
25
+ var _InputGroup2 = _interopRequireDefault ( _InputGroup ) ;
26
+
27
+ var _Overlay = require ( 'react-bootstrap/lib/Overlay' ) ;
28
+
29
+ var _Overlay2 = _interopRequireDefault ( _Overlay ) ;
30
+
31
+ var _Popover = require ( 'react-bootstrap/lib/Popover' ) ;
32
+
33
+ var _Popover2 = _interopRequireDefault ( _Popover ) ;
16
34
17
35
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
18
36
@@ -31,11 +49,13 @@ var CalendarHeader = _react2.default.createClass({
31
49
32
50
handleClickPrevious : function handleClickPrevious ( ) {
33
51
var newDisplayDate = new Date ( this . props . displayDate ) ;
52
+ newDisplayDate . setDate ( 1 ) ;
34
53
newDisplayDate . setMonth ( newDisplayDate . getMonth ( ) - 1 ) ;
35
54
this . props . onChange ( newDisplayDate ) ;
36
55
} ,
37
56
handleClickNext : function handleClickNext ( ) {
38
57
var newDisplayDate = new Date ( this . props . displayDate ) ;
58
+ newDisplayDate . setDate ( 1 ) ;
39
59
newDisplayDate . setMonth ( newDisplayDate . getMonth ( ) + 1 ) ;
40
60
this . props . onChange ( newDisplayDate ) ;
41
61
} ,
@@ -211,7 +231,7 @@ var Calendar = _react2.default.createClass({
211
231
'td' ,
212
232
{ colSpan : this . props . dayLabels . length , style : { paddingTop : '9px' } } ,
213
233
_react2 . default . createElement (
214
- _reactBootstrap . Button ,
234
+ _Button2 . default ,
215
235
{
216
236
block : true ,
217
237
bsSize : 'xsmall' ,
@@ -557,7 +577,7 @@ exports.default = _react2.default.createClass({
557
577
className : this . props . className ,
558
578
style : this . props . style ,
559
579
autoComplete : this . props . autoComplete
560
- } ) : _react2 . default . createElement ( _reactBootstrap . FormControl , {
580
+ } ) : _react2 . default . createElement ( _FormControl2 . default , {
561
581
onKeyDown : this . handleKeyDown ,
562
582
value : this . state . inputValue || '' ,
563
583
required : this . props . required ,
@@ -575,15 +595,15 @@ exports.default = _react2.default.createClass({
575
595
} ) ;
576
596
577
597
return _react2 . default . createElement (
578
- _reactBootstrap . InputGroup ,
598
+ _InputGroup2 . default ,
579
599
{
580
600
ref : 'inputGroup' ,
581
601
bsClass : this . props . showClearButton ? this . props . bsClass : '' ,
582
602
bsSize : this . props . bsSize ,
583
603
id : this . props . id ? this . props . id + '_group' : null } ,
584
604
control ,
585
605
_react2 . default . createElement (
586
- _reactBootstrap . Overlay ,
606
+ _Overlay2 . default ,
587
607
{
588
608
rootClose : true ,
589
609
onHide : this . handleHide ,
@@ -597,7 +617,7 @@ exports.default = _react2.default.createClass({
597
617
placement : this . props . calendarPlacement ,
598
618
delayHide : 200 } ,
599
619
_react2 . default . createElement (
600
- _reactBootstrap . Popover ,
620
+ _Popover2 . default ,
601
621
{ id : 'date-picker-popover-' + this . props . instanceCount , className : 'date-picker-popover' , title : calendarHeader } ,
602
622
_react2 . default . createElement ( Calendar , {
603
623
cellPadding : this . props . cellPadding ,
@@ -617,7 +637,7 @@ exports.default = _react2.default.createClass({
617
637
_react2 . default . createElement ( 'div' , { ref : 'overlayContainer' , style : { position : 'relative' } } ) ,
618
638
_react2 . default . createElement ( 'input' , { ref : 'hiddenInput' , type : 'hidden' , id : this . props . id , name : this . props . name , value : this . state . value || '' , 'data-formattedvalue' : this . state . value ? this . state . inputValue : '' } ) ,
619
639
this . props . showClearButton && ! this . props . customControl && _react2 . default . createElement (
620
- _reactBootstrap . InputGroup . Addon ,
640
+ _InputGroup2 . default . Addon ,
621
641
{
622
642
onClick : this . props . disabled ? null : this . clear ,
623
643
style : { cursor : this . state . inputValue && ! this . props . disabled ? 'pointer' : 'not-allowed' } } ,
0 commit comments