File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
bootstrap_datepicker_plus/static/bootstrap_datepicker_plus/js Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1616 function initOnePicker ( element , options ) {
1717 var $element = $ ( element ) , data = { } ;
1818 try {
19- data = JSON . parse ( $element . attr ( 'data-dp-config' ) ) ;
19+ data = JSON . parse ( $element . attr ( 'data-dp-config' ) || $ ( "[dp_config]" ) . attr ( "dp_config" ) ) ;
2020 }
2121 catch ( x ) { }
2222 $ . extend ( 1 , data . options , options ) ;
6868 }
6969 $ ( function ( ) {
7070 $ ( "[data-dp-config]:not([disabled])" ) . djangoDatetimePicker ( ) ;
71+ $ ( "[dp_config]:not([disabled])" ) . djangoDatetimePicker ( ) ;
72+ // Old packages still loads this js file from master branch
7173 if ( isBootstrap4 || isBootstrap5 ) {
7274 $ ( 'body' ) . on ( 'show.bs.collapse' , '.bootstrap-datetimepicker-widget .collapse' , function ( e ) {
7375 $ ( e . target ) . addClass ( 'in' ) ;
You can’t perform that action at this time.
0 commit comments