md-date-time-picker icon indicating copy to clipboard operation
md-date-time-picker copied to clipboard

Draggabilly not optional again

Open rfontanella opened this issue 8 years ago • 7 comments
trafficstars

It's mentioned HERE that the Draggabilly is an optional dependency, but when not including it javascript returns an error _Draggabilly2.default is not a constructor and the window doesn't open.

As far as I'm aware there is no flag to set to disable or enable the usage of Draggabilly

This is a copy of the old #196 issue, bu the problem come back Test it on JsFiddle

rfontanella avatar Jul 05 '17 11:07 rfontanella

@digitalkaoz we had this problem fixed in a PR right? I will need to recheck it. Also removing the optional message from docs until we can figure out how to actually make it optional.

puranjayjain avatar Jul 05 '17 11:07 puranjayjain

@puranjayjain and @digitalkaoz If it helps, commenting line 505 ( this._dragDial(); ) solve the problem and keep the plugin working. You probably just need a boolean setting to allow/disallow draggability!

rfontanella avatar Jul 05 '17 11:07 rfontanella

@rfontanella we could actually make a guard condition to make it work. Great suggestion btw.

puranjayjain avatar Jul 05 '17 11:07 puranjayjain

@puranjayjain As of the latest code the bug exists. moreover the code refers Draggabilly as 'draggabilly' but in the file draggabilly.pkgd.js, it is exported as Draggabilly. hence its never found in the script even if Draggabilly is included in the page. it results in a '_draggabilly2.default is not a constructor' error.

saha-kpghoshal avatar Sep 06 '17 07:09 saha-kpghoshal

@puranjayjain This bug is still present. I could not init any time dial. But according to the tip of @rfontanella by removing this_dragDial() I could it make work. Please take your time and fix it!

macx avatar Jan 22 '18 13:01 macx

Investigated this issue using the demo which comes with this gulp build: The time picker is not working. Commenting this line it will bring the demo back to life: https://github.com/puranjayjain/md-date-time-picker/blob/master/src/js/mdDateTimePicker.js#L13

macx avatar Jan 22 '18 14:01 macx

The time picker works when I use with draggabilly 2.2.0

slevy85 avatar Apr 23 '18 13:04 slevy85