md-date-time-picker
md-date-time-picker copied to clipboard
Bugs with Draggabilly
I think I found two bugs regarding the usage of the draggabilly library:
-
If I add the draggabilly library to my project it throws an error in the browser console. As far as I invesitaged this issue it is caused by a compilation or typing issue. The problem ist line number 10 in the mdDateTimePicker.js file (located in dist/js). There the factory is called with global.draggabilly but insead it should be global.Draggabilly because the capitalized Draggabilly constructor function.
-
As soon as I activate the autoClose option, the draggabilly support is gone. I have no Idea up to now what's the reason for this bug.
Regards, Daniel
@fancyDevelopment this seems to be an ongoing problem which was addressed in multiple bug fixes. I will investigate further on this. The problem seems to stem from the draggability library and its bundling.
I would also require more information on how you are using the project i.e. how you import, any bundlers etc.
Basically I am using Fabricator to build up a ui toolkit for my project. Within the fabricator template I use gulp to concat all used libraries and my own JavaScript code. The following Code snippet shows my gulp task for this. I am using the standard gulp plugins for this:
gulp.src([config.src.scripts.vendor + 'jquery/dist/jquery.js',
config.src.scripts.vendor + 'materialize-css/dist/js/materialize.js',
config.src.scripts.vendor + 'wowjs/dist/wow.js',
config.src.scripts.vendor + 'd3/build/d3.js',
config.src.scripts.vendor + 'swiper/dist/js/swiper.js',
config.src.scripts.vendor + 'moment/moment.js',
config.src.scripts.vendor + 'moment/locale/de.js',
config.src.scripts.vendor + 'draggabilly/dist/draggabilly.pkgd.js',
//config.src.scripts.vendor + 'md-date-time-picker/dist/js/mdDateTimePicker.js',
config.src.scripts.dateTimePicker,
config.src.scripts.toolkit])
.pipe(sourcemaps.init())
.pipe(concat('toolkit.js'))
.pipe(gulp.dest(config.dest + '/assets/toolkit/scripts')) // save .js
.pipe(uglify())
.pipe(rename({ extname: '.min.js'}))
.pipe(sourcemaps.write('maps'))
.pipe(gulp.dest(config.dest + '/assets/toolkit/scripts'));
});
In the gulp task config.src.scripts.vendor is the path to the node_modules folder. The path to the date time picker is commented out because I copied the code in a new file, fixed the issue as stated in my first post under 1 and importing this code into my bundle.
If you need any other information please let me know!
Hi. I've got the same issue, draggabilly does not work if autoClose is enabled. Is this still a work in progress? Thank you!