@@ -381,6 +381,17 @@ return /******/ (function(modules) { // webpackBootstrap
381
381
} ) ;
382
382
} ;
383
383
384
+ this . size = function ( ) {
385
+ switch ( _this . props . size ) {
386
+ case _ConstantsJs2 [ "default" ] . SIZE_SMALL :
387
+ return "form-group-sm" ;
388
+ case _ConstantsJs2 [ "default" ] . SIZE_LARGE :
389
+ return "form-group-lg" ;
390
+ }
391
+
392
+ return "" ;
393
+ } ;
394
+
384
395
this . renderOverlay = function ( ) {
385
396
var styles = {
386
397
position : "fixed" ,
@@ -391,7 +402,7 @@ return /******/ (function(modules) { // webpackBootstrap
391
402
zIndex : "999"
392
403
} ;
393
404
if ( _this . state . showPicker ) {
394
- return _react2 [ "default" ] . createElement ( "div" , { style : styles , onClick : _this . closePicker } ) ;
405
+ return _react2 [ "default" ] . createElement ( "div" , { onClick : _this . closePicker , style : styles } ) ;
395
406
} else {
396
407
return _react2 [ "default" ] . createElement ( "span" , null ) ;
397
408
}
@@ -405,7 +416,7 @@ return /******/ (function(modules) { // webpackBootstrap
405
416
"div" ,
406
417
null ,
407
418
this . renderOverlay ( ) ,
408
- _react2 [ "default" ] . createElement ( _DateTimePickerJs2 [ "default" ] , { ref : "widget" ,
419
+ _react2 [ "default" ] . createElement ( _DateTimePickerJs2 [ "default" ] , {
409
420
addDecade : this . addDecade ,
410
421
addHour : this . addHour ,
411
422
addMinute : this . addMinute ,
@@ -415,6 +426,7 @@ return /******/ (function(modules) { // webpackBootstrap
415
426
maxDate : this . props . maxDate ,
416
427
minDate : this . props . minDate ,
417
428
mode : this . props . mode ,
429
+ ref : "widget" ,
418
430
selectedDate : this . state . selectedDate ,
419
431
setSelectedDate : this . setSelectedDate ,
420
432
setSelectedHour : this . setSelectedHour ,
@@ -438,11 +450,11 @@ return /******/ (function(modules) { // webpackBootstrap
438
450
} ) ,
439
451
_react2 [ "default" ] . createElement (
440
452
"div" ,
441
- { className : "input-group date" , ref : "datetimepicker" } ,
442
- _react2 [ "default" ] . createElement ( "input" , _extends ( { type : "text" , className : "form-control" , onChange : this . onChange , value : this . state . inputValue } , this . props . inputProps ) ) ,
453
+ { className : "input-group date " + this . size ( ) , ref : "datetimepicker" } ,
454
+ _react2 [ "default" ] . createElement ( "input" , _extends ( { className : "form-control" , onChange : this . onChange , type : "text" , value : this . state . inputValue } , this . props . inputProps ) ) ,
443
455
_react2 [ "default" ] . createElement (
444
456
"span" ,
445
- { className : "input-group-addon" , onClick : this . onClick , onBlur : this . onBlur , ref : "dtpbutton" } ,
457
+ { className : "input-group-addon" , onBlur : this . onBlur , onClick : this . onClick , ref : "dtpbutton" } ,
446
458
_react2 [ "default" ] . createElement ( _reactBootstrap . Glyphicon , { glyph : this . state . buttonIcon } )
447
459
)
448
460
)
@@ -456,6 +468,7 @@ return /******/ (function(modules) { // webpackBootstrap
456
468
showToday : true ,
457
469
viewMode : "days" ,
458
470
daysOfWeekDisabled : [ ] ,
471
+ size : _ConstantsJs2 [ "default" ] . SIZE_MEDIUM ,
459
472
mode : _ConstantsJs2 [ "default" ] . MODE_DATETIME ,
460
473
onChange : function onChange ( x ) {
461
474
console . log ( x ) ;
@@ -465,7 +478,7 @@ return /******/ (function(modules) { // webpackBootstrap
465
478
} , {
466
479
key : "propTypes" ,
467
480
value : {
468
- dateTime : _react . PropTypes . string ,
481
+ dateTime : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . number ] ) ,
469
482
onChange : _react . PropTypes . func ,
470
483
format : _react . PropTypes . string ,
471
484
inputProps : _react . PropTypes . object ,
@@ -477,6 +490,7 @@ return /******/ (function(modules) { // webpackBootstrap
477
490
direction : _react . PropTypes . string ,
478
491
showToday : _react . PropTypes . bool ,
479
492
viewMode : _react . PropTypes . string ,
493
+ size : _react . PropTypes . oneOf ( [ _ConstantsJs2 [ "default" ] . SIZE_SMALL , _ConstantsJs2 [ "default" ] . SIZE_MEDIUM , _ConstantsJs2 [ "default" ] . SIZE_LARGE ] ) ,
480
494
daysOfWeekDisabled : _react . PropTypes . arrayOf ( _react . PropTypes . integer )
481
495
} ,
482
496
enumerable : true
@@ -1502,7 +1516,7 @@ return /******/ (function(modules) { // webpackBootstrap
1502
1516
if ( minDate && prevMonth . isBefore ( minDate ) || maxDate && prevMonth . isAfter ( maxDate ) ) {
1503
1517
classes . disabled = true ;
1504
1518
}
1505
- if ( _this . props . daysOfWeekDisabled ) classes . disabled = _this . props . daysOfWeekDisabled . indexOf ( prevMonth . day ( ) ) !== - 1 ;
1519
+ if ( _this . props . daysOfWeekDisabled . length > 0 ) classes . disabled = _this . props . daysOfWeekDisabled . indexOf ( prevMonth . day ( ) ) !== - 1 ;
1506
1520
cells . push ( _react2 [ "default" ] . createElement (
1507
1521
"td" ,
1508
1522
{ key : prevMonth . month ( ) + "-" + prevMonth . date ( ) , className : ( 0 , _classnames2 [ "default" ] ) ( classes ) , onClick : _this . props . setSelectedDate } ,
@@ -2298,7 +2312,11 @@ return /******/ (function(modules) { // webpackBootstrap
2298
2312
module . exports = {
2299
2313
MODE_DATE : "date" ,
2300
2314
MODE_DATETIME : "datetime" ,
2301
- MODE_TIME : "time"
2315
+ MODE_TIME : "time" ,
2316
+
2317
+ SIZE_SMALL : "sm" ,
2318
+ SIZE_MEDIUM : "md" ,
2319
+ SIZE_LARGE : "lg"
2302
2320
} ;
2303
2321
2304
2322
/***/ } ,
0 commit comments