Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this date picker? #55

Closed
pratiksharma9 opened this issue Sep 23, 2016 · 6 comments
Closed

How to use this date picker? #55

pratiksharma9 opened this issue Sep 23, 2016 · 6 comments

Comments

@pratiksharma9
Copy link

Hello all,

Please update README that how to use.

@connecttheworld
Copy link

Which version of Angular 2 are you trying to integrate with. The official release or a RC version? It makes a difference if your version of Angular 2 uses NgModules or not.

@cukingpro
Copy link

Hi
I'm using Angular RC 5 and it uses ngModule
When I imported to the module. It said cannot find module ng2-datepicker

@connecttheworld
Copy link

connecttheworld commented Sep 27, 2016

@cukingpro If you look at the package.json, ng2-datepicker uses Angular RC.4, which doesn't use NgModule if I'm not mistaken. So there is no ng2-datepicker module. Check out the comments from #49 .

I think you need in the module where you are using the datepicker.

import {DatePicker} from 'ng2-datepicker/ng2-datepicker';

@NgModule({
  ...,
  declarations: [DatePicker, ...],
  ...
})

@jkuri
Copy link
Contributor

jkuri commented Sep 27, 2016

That's right. This should work with Angular 2.0.0.

@nenych
Copy link

nenych commented Oct 4, 2016

Hello.
I use angular 2.0.0-rc.5. Can someone explain how to use this module?
In my app.mosule.ts I did:
import { DatePicker } from '../node_modules/ng2-datepicker/ng2-datepicker';
...
@NgModule({
...,
declarations: [DatePicker, ...],
...
})

But after compilation I got an error:
Error: SyntaxError: Unexpected token <
at Object.eval (http://10.10.17.179:8181/js/app.module.js:16:24)
at eval (http://10.10.17.179:8181/js/app.module.js:50:4)
at eval (http://10.10.17.179:8181/js/app.module.js:51:3)
Evaluating http://10.10.17.179:8181/node_modules/ng2-datepicker/ng2-datepicker
Evaluating http://10.10.17.179:8181/js/app.module.js
Evaluating http://10.10.17.179:8181/js/main.js
Error loading http://10.10.17.179:8181/js/main.js

@jkuri
Copy link
Contributor

jkuri commented Oct 4, 2016

#62

@jkuri jkuri closed this as completed Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants