@@ -416,16 +416,27 @@ var Datetime = createClass({
416
416
children = [ ] ;
417
417
418
418
if ( this . props . input ) {
419
- children = [ React . createElement ( 'input' , assign ( {
420
- key : 'i' ,
421
- type : 'text' ,
422
- className : 'form-control' ,
423
- onClick : this . openCalendar ,
424
- onFocus : this . openCalendar ,
425
- onChange : this . onInputChange ,
426
- onKeyDown : this . onInputKey ,
427
- value : this . state . inputValue
428
- } , this . props . inputProps ) ) ] ;
419
+ if ( this . props . renderInput ) {
420
+ children = children . concat ( this . props . renderInput ( {
421
+ onClick : this . openCalendar ,
422
+ onFocus : this . openCalendar ,
423
+ onChange : this . onInputChange ,
424
+ onKeyDown : this . onInputKey ,
425
+ value : this . state . inputValue ,
426
+ openCalendar : this . openCalendar ,
427
+ } ) ) ;
428
+ } else {
429
+ children = [ DOM . input ( assign ( {
430
+ key : 'i' ,
431
+ type : 'text' ,
432
+ className : 'form-control' ,
433
+ onClick : this . openCalendar ,
434
+ onFocus : this . openCalendar ,
435
+ onChange : this . onInputChange ,
436
+ onKeyDown : this . onInputKey ,
437
+ value : this . state . inputValue
438
+ } , this . props . inputProps ) ) ] ;
439
+ }
429
440
} else {
430
441
className += ' rdtStatic' ;
431
442
}
0 commit comments