@@ -476,7 +476,7 @@ class DateRangePicker extends BaseComponent {
476
476
ariaNavPrevMonthLabel : this . _config . ariaNavPrevMonthLabel ,
477
477
ariaNavPrevYearLabel : this . _config . ariaNavPrevYearLabel ,
478
478
calendarDate : this . _calendarDate ,
479
- calendars : this . _config . calendars ,
479
+ calendars : this . _mobile ? 1 : this . _config . calendars ,
480
480
disabledDates : this . _config . disabledDates ,
481
481
endDate : this . _endDate ,
482
482
firstDayOfWeek : this . _config . firstDayOfWeek ,
@@ -672,12 +672,12 @@ class DateRangePicker extends BaseComponent {
672
672
} )
673
673
674
674
if ( this . _config . timepicker ) {
675
- if ( this . _mobile || ( this . _range && this . _config . calendars === 1 ) ) {
675
+ if ( ( this . _mobile && this . _config . range ) || ( this . _config . range && this . _config . calendars === 1 ) ) {
676
676
const timePickerStartEl = document . createElement ( 'div' )
677
677
timePickerStartEl . classList . add ( CLASS_NAME_TIME_PICKER )
678
678
this . _timePickerStart = new TimePicker ( timePickerStartEl , this . _getTimePickerConfig ( true ) )
679
679
680
- calendarEl . append ( timePickerStartEl )
680
+ this . _timepickers . append ( timePickerStartEl )
681
681
682
682
EventHandler . on ( timePickerStartEl , 'timeChange.coreui.time-picker' , event => {
683
683
this . _changeStartDate ( event . date , true )
0 commit comments