indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
527 stars 229 forks source link

Build Issues?? #208

Closed andrewhanson closed 6 years ago

andrewhanson commented 6 years ago

We really like this picker and have enjoyed using it but we need to add timezone support. So while I'm not super familiar with typescript I figured I would at least try to update the project myself with the hopes of submitting the change back.

After cloning the repo and running npm install and then npm run build I received the following build errors?

ERROR in /Users/andrew/Projects/clients/QuickMar/code/angularmomentpicker/tests/properties/validate.ts
(20,51): error TS2551: Property 'appendTo' does not exist on type 'JQuery'. Did you mean 'append'?

ERROR in /Users/andrew/Projects/clients/QuickMar/code/angularmomentpicker/tests/properties/keyboard.ts
(23,23): error TS2304: Cannot find name '$'.

ERROR in /Users/andrew/Projects/clients/QuickMar/code/angularmomentpicker/tests/properties/keyboard.ts
(68,47): error TS2339: Property 'is' does not exist on type 'IAugmentedJQuery'.

ERROR in /Users/andrew/Projects/clients/QuickMar/code/angularmomentpicker/tests/properties/isOpen.ts
(17,80): error TS2339: Property 'is' does not exist on type 'IAugmentedJQuery'.

ERROR in /Users/andrew/Projects/clients/QuickMar/code/angularmomentpicker/tests/utility.ts
(65,27): error TS2339: Property 'trigger' does not exist on type 'JQuery'.

ERROR in /Users/andrew/Projects/clients/QuickMar/code/angularmomentpicker/tests/openClosePicker.ts
(19,80): error TS2339: Property 'is' does not exist on type 'IAugmentedJQuery'.

ERROR in ./src/index.ts
(12,56): error TS2559: Type 'Provider' has no properties in common with type 'IProviderOptions'.

Is there a step I'm missing or something wrong with my local setup?

I can make some code changes and get the project to compile but I'd rather not make code changes before I've even started looking at adding my intended feature.

Oh, I'm working in Visual Studio Code on a Mac if that makes a difference.

andrewhanson commented 6 years ago

Found a way forward,

fbatroni commented 6 years ago

Hey @andrewhanson - I'm getting the same errors - how did you get past this build issue?

andrewhanson commented 6 years ago

@fbatroni I ended up just fixing the compile errors by adding some imports and changing the code (which I didn't want to do initially) I also commented out some tests that I couldn't get to pass.

You can see my fork here: https://github.com/MedManagement/angular-moment-picker/

Warning: it also contains some UI changes that are kind of hacked in there that were asked for by my current client.