@@ -75,6 +75,7 @@ const CALENDAR_NAVIGATOR_PREVIOUS_VIEW_CLASS = 'dx-calendar-navigator-previous-v
7575const DROPDOWNEDITOR_OVERLAY_CLASS = 'dx-dropdowneditor-overlay' ;
7676const NUMBERBOX_CLASS = 'dx-numberbox' ;
7777const NUMBERBOX_SPIN_DOWN_CLASS = 'dx-numberbox-spin-down' ;
78+ const SELECTBOX_CLASS = 'dx-selectbox' ;
7879const SHOW_INVALID_BADGE_CLASS = 'dx-show-invalid-badge' ;
7980
8081const APPLY_BUTTON_SELECTOR = '.dx-popup-done.dx-button' ;
@@ -3250,9 +3251,9 @@ QUnit.module('datebox with time component', {
32503251
32513252 dateBox . open ( ) ;
32523253
3253- const hourEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 0 ) ;
3254- const minuteEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 1 ) ;
3255- const amPmEditor = $ ( '.dx-timeview-field .dx-selectbox' ) . eq ( 0 ) ;
3254+ const hourEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 0 ) ;
3255+ const minuteEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 1 ) ;
3256+ const amPmEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ SELECTBOX_CLASS } ` ) . eq ( 0 ) ;
32563257
32573258 assert . ok ( hourEditor . hasClass ( 'dx-editor-outlined' ) ) ;
32583259 assert . ok ( minuteEditor . hasClass ( 'dx-editor-outlined' ) ) ;
@@ -3271,15 +3272,32 @@ QUnit.module('datebox with time component', {
32713272
32723273 dateBox . open ( ) ;
32733274
3274- const hourEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 0 ) ;
3275- const minuteEditor = $ ( '.dx-timeview-field .dx-numberbox' ) . eq ( 1 ) ;
3276- const amPmEditor = $ ( '.dx-timeview-field .dx-selectbox' ) . eq ( 0 ) ;
3275+ const hourEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 0 ) ;
3276+ const minuteEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ NUMBERBOX_CLASS } ` ) . eq ( 1 ) ;
3277+ const amPmEditor = $ ( `. ${ TIMEVIEW_CLASS } . ${ SELECTBOX_CLASS } ` ) . eq ( 0 ) ;
32773278
32783279 assert . ok ( hourEditor . hasClass ( 'dx-editor-underlined' ) ) ;
32793280 assert . ok ( minuteEditor . hasClass ( 'dx-editor-underlined' ) ) ;
32803281 assert . ok ( amPmEditor . hasClass ( 'dx-editor-underlined' ) ) ;
32813282 } ) ;
32823283
3284+ QUnit . test ( 'DateBox with timeview should have amPm popup inside of dateBox popup content (T1300566)' , function ( assert ) {
3285+ const dateBox = $ ( '#dateBox' ) . dxDateBox ( {
3286+ type : 'datetime' ,
3287+ pickerType : 'calendar' ,
3288+ opened : true ,
3289+ displayFormat : 'ddMMyy hh:mm' ,
3290+ } ) . dxDateBox ( 'instance' ) ;
3291+ const amPmEditor = $ ( `.${ TIMEVIEW_CLASS } .${ SELECTBOX_CLASS } ` ) . eq ( 0 ) . dxSelectBox ( 'instance' ) ;
3292+
3293+ amPmEditor . open ( ) ;
3294+
3295+ const $dateBoxPopup = $ ( dateBox . content ( ) ) ;
3296+ const $amPmPopup = $ ( amPmEditor . content ( ) ) ;
3297+
3298+ assert . strictEqual ( $amPmPopup . closest ( $dateBoxPopup ) . length , 1 , 'amPm popup is inside dateBox popup' ) ;
3299+ } ) ;
3300+
32833301 QUnit . test ( 'Reset seconds and milliseconds when DateBox has no value for time view' , function ( assert ) {
32843302 const dateBox = $ ( '#dateBox' ) . dxDateBox ( {
32853303 pickerType : 'list' ,
0 commit comments