File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 6363 module . debug ( 'Initializing calendar for' , element ) ;
6464
6565 isTouch = module . get . isTouch ( ) ;
66- if ( settings . inline ) {
67- module . setup . inline ( ) ;
68- } else {
69- module . setup . popup ( ) ;
70- }
66+ module . setup . popup ( ) ;
67+ module . setup . inline ( ) ;
7168 module . setup . input ( ) ;
7269 module . create . calendar ( ) ;
7370
8986
9087 setup : {
9188 popup : function ( ) {
92- if ( $ . fn . popup === undefined ) {
93- module . error ( error . popup ) ;
89+ if ( settings . inline ) {
9490 return ;
9591 }
9692 if ( ! $activator . length ) {
9793 $activator = $module . children ( ) . first ( ) ;
9894 if ( ! $activator . length ) {
99- module . error ( error . activator ) ;
10095 return ;
10196 }
10297 }
98+ if ( $ . fn . popup === undefined ) {
99+ module . error ( error . popup ) ;
100+ return ;
101+ }
103102 if ( ! $container . length ) {
104103 //prepend the popup element to the activator's parent so that it has less chance of messing with
105104 //the styling (eg input action button needs to be the last child to have correct border radius)
137136 module . popup ( options ) ;
138137 } ,
139138 inline : function ( ) {
139+ if ( $activator . length && ! settings . inline ) {
140+ return ;
141+ }
140142 $container = $ ( '<div/>' ) . addClass ( className . calendar ) . appendTo ( $module ) ;
141143 if ( ! $input . length ) {
142144 $container . attr ( 'tabindex' , '0' ) ;
805807
806808 error : {
807809 popup : 'UI Popup, a required component is not included in this page' ,
808- activator : 'No activator found for the calendar popup' ,
809810 method : 'The method you called is not defined.'
810811 } ,
811812
You can’t perform that action at this time.
0 commit comments