@@ -74,6 +74,7 @@ const CALENDAR_NAVIGATOR_PREVIOUS_VIEW_CLASS = 'dx-calendar-navigator-previous-v
7474const DROPDOWNEDITOR_OVERLAY_CLASS = 'dx-dropdowneditor-overlay' ;
7575const NUMBERBOX_CLASS = 'dx-numberbox' ;
7676const NUMBERBOX_SPIN_DOWN_CLASS = 'dx-numberbox-spin-down' ;
77+ const SELECTBOX_CLASS = 'dx-selectbox' ;
7778const SHOW_INVALID_BADGE_CLASS = 'dx-show-invalid-badge' ;
7879
7980const APPLY_BUTTON_SELECTOR = '.dx-popup-done.dx-button' ;
@@ -3262,9 +3263,9 @@ QUnit.module('datebox with time component', {
32623263
32633264 dateBox . open ( ) ;
32643265
3265- const hourEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 0 ) ;
3266- const minuteEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 1 ) ;
3267- const amPmEditor = $ ( '.dx-timeview-field .dx-selectbox' ) . eq ( 0 ) ;
3266+ const hourEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 0 ) ;
3267+ const minuteEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 1 ) ;
3268+ const amPmEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ SELECTBOX_CLASS } ` ) . eq ( 0 ) ;
32683269
32693270 assert . ok ( hourEditor . hasClass ( 'dx-editor-outlined' ) ) ;
32703271 assert . ok ( minuteEditor . hasClass ( 'dx-editor-outlined' ) ) ;
@@ -3284,15 +3285,32 @@ QUnit.module('datebox with time component', {
32843285
32853286 dateBox . open ( ) ;
32863287
3287- const hourEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 0 ) ;
3288- const minuteEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 1 ) ;
3289- const amPmEditor = $ ( '.dx-timeview-field .dx-selectbox' ) . eq ( 0 ) ;
3288+ const hourEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 0 ) ;
3289+ const minuteEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 1 ) ;
3290+ const amPmEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ SELECTBOX_CLASS } ` ) . eq ( 0 ) ;
32903291
32913292 assert . ok ( hourEditor . hasClass ( 'dx-editor-underlined' ) ) ;
32923293 assert . ok ( minuteEditor . hasClass ( 'dx-editor-underlined' ) ) ;
32933294 assert . ok ( amPmEditor . hasClass ( 'dx-editor-underlined' ) ) ;
32943295 } ) ;
32953296
3297+ QUnit . test ( 'DateBox with timeview should have amPm popup inside of dateBox popup content (T1300566)' , function ( assert ) {
3298+ const dateBox = $ ( '#dateBox' ) . dxDateBox ( {
3299+ type : 'datetime' ,
3300+ pickerType : 'calendar' ,
3301+ opened : true ,
3302+ displayFormat : 'ddMMyy hh:mm' ,
3303+ } ) . dxDateBox ( 'instance' ) ;
3304+ const amPmEditor = $ ( `.${ TIMEVIEW_CLASS } .${ SELECTBOX_CLASS } ` ) . eq ( 0 ) . dxSelectBox ( 'instance' ) ;
3305+
3306+ amPmEditor . open ( ) ;
3307+
3308+ const $dateBoxPopup = $ ( dateBox . content ( ) ) ;
3309+ const $amPmPopup = $ ( amPmEditor . content ( ) ) ;
3310+
3311+ assert . strictEqual ( $amPmPopup . closest ( $dateBoxPopup ) . length , 1 , 'amPm popup is inside dateBox popup' ) ;
3312+ } ) ;
3313+
32963314 QUnit . test ( 'Reset seconds and milliseconds when DateBox has no value for time view' , function ( assert ) {
32973315 const dateBox = $ ( '#dateBox' ) . dxDateBox ( {
32983316 pickerType : 'list' ,
0 commit comments