@@ -381,6 +381,17 @@ return /******/ (function(modules) { // webpackBootstrap
381381 } ) ;
382382 } ;
383383
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+
384395 this . renderOverlay = function ( ) {
385396 var styles = {
386397 position : "fixed" ,
@@ -391,7 +402,7 @@ return /******/ (function(modules) { // webpackBootstrap
391402 zIndex : "999"
392403 } ;
393404 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 } ) ;
395406 } else {
396407 return _react2 [ "default" ] . createElement ( "span" , null ) ;
397408 }
@@ -405,7 +416,7 @@ return /******/ (function(modules) { // webpackBootstrap
405416 "div" ,
406417 null ,
407418 this . renderOverlay ( ) ,
408- _react2 [ "default" ] . createElement ( _DateTimePickerJs2 [ "default" ] , { ref : "widget" ,
419+ _react2 [ "default" ] . createElement ( _DateTimePickerJs2 [ "default" ] , {
409420 addDecade : this . addDecade ,
410421 addHour : this . addHour ,
411422 addMinute : this . addMinute ,
@@ -415,6 +426,7 @@ return /******/ (function(modules) { // webpackBootstrap
415426 maxDate : this . props . maxDate ,
416427 minDate : this . props . minDate ,
417428 mode : this . props . mode ,
429+ ref : "widget" ,
418430 selectedDate : this . state . selectedDate ,
419431 setSelectedDate : this . setSelectedDate ,
420432 setSelectedHour : this . setSelectedHour ,
@@ -438,11 +450,11 @@ return /******/ (function(modules) { // webpackBootstrap
438450 } ) ,
439451 _react2 [ "default" ] . createElement (
440452 "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 ) ) ,
443455 _react2 [ "default" ] . createElement (
444456 "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" } ,
446458 _react2 [ "default" ] . createElement ( _reactBootstrap . Glyphicon , { glyph : this . state . buttonIcon } )
447459 )
448460 )
@@ -456,6 +468,7 @@ return /******/ (function(modules) { // webpackBootstrap
456468 showToday : true ,
457469 viewMode : "days" ,
458470 daysOfWeekDisabled : [ ] ,
471+ size : _ConstantsJs2 [ "default" ] . SIZE_MEDIUM ,
459472 mode : _ConstantsJs2 [ "default" ] . MODE_DATETIME ,
460473 onChange : function onChange ( x ) {
461474 console . log ( x ) ;
@@ -465,7 +478,7 @@ return /******/ (function(modules) { // webpackBootstrap
465478 } , {
466479 key : "propTypes" ,
467480 value : {
468- dateTime : _react . PropTypes . string ,
481+ dateTime : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . number ] ) ,
469482 onChange : _react . PropTypes . func ,
470483 format : _react . PropTypes . string ,
471484 inputProps : _react . PropTypes . object ,
@@ -477,6 +490,7 @@ return /******/ (function(modules) { // webpackBootstrap
477490 direction : _react . PropTypes . string ,
478491 showToday : _react . PropTypes . bool ,
479492 viewMode : _react . PropTypes . string ,
493+ size : _react . PropTypes . oneOf ( [ _ConstantsJs2 [ "default" ] . SIZE_SMALL , _ConstantsJs2 [ "default" ] . SIZE_MEDIUM , _ConstantsJs2 [ "default" ] . SIZE_LARGE ] ) ,
480494 daysOfWeekDisabled : _react . PropTypes . arrayOf ( _react . PropTypes . integer )
481495 } ,
482496 enumerable : true
@@ -1502,7 +1516,7 @@ return /******/ (function(modules) { // webpackBootstrap
15021516 if ( minDate && prevMonth . isBefore ( minDate ) || maxDate && prevMonth . isAfter ( maxDate ) ) {
15031517 classes . disabled = true ;
15041518 }
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 ;
15061520 cells . push ( _react2 [ "default" ] . createElement (
15071521 "td" ,
15081522 { key : prevMonth . month ( ) + "-" + prevMonth . date ( ) , className : ( 0 , _classnames2 [ "default" ] ) ( classes ) , onClick : _this . props . setSelectedDate } ,
@@ -2298,7 +2312,11 @@ return /******/ (function(modules) { // webpackBootstrap
22982312 module . exports = {
22992313 MODE_DATE : "date" ,
23002314 MODE_DATETIME : "datetime" ,
2301- MODE_TIME : "time"
2315+ MODE_TIME : "time" ,
2316+
2317+ SIZE_SMALL : "sm" ,
2318+ SIZE_MEDIUM : "md" ,
2319+ SIZE_LARGE : "lg"
23022320 } ;
23032321
23042322/***/ } ,
0 commit comments