Comments (9)
Are you using SystemJS loader?
from ng2-datepicker.
I am using SystemJS loader in my app, but did not want to use it for DatePicker.
This may be a problem for me though, and it looks like an issue might also be that since I am also not including moment in the SystemJS loader that ng2-datepicker is also unable to import moment.
from ng2-datepicker.
Yes, that might be an issue. Please try including ng2-datepicker
as I wrote in the readme.. If that won't work, I can prepare standalone .js
file which can be included as <script src="...."></script>
.
from ng2-datepicker.
Adding moment and ng2-datepicker into systemjs loader corrected the issues.
The readme does not note that this is a required step and also has an example with ng2-slimscroll instead of datepicker.
It would be very nice if this component could just be imported in the standard angular2 way with
" import {DatePicker} from 'node_modules/ng2-datepicker' " without having to alter systemjs loader with this and with moment.
Otherwise, well done and thanks for the component.
from ng2-datepicker.
Thanks for noticing error in readme, I fixed it. No problem, glad you find it useful.
from ng2-datepicker.
Jan,
thanks again for your work on this library. i'm new to all these build tools. if i'm using webpack, i'm getting a reference error because the .js uses System.*
Do I have to abandon webpack for SystemJS to use your application in my application?
Thanks,
from ng2-datepicker.
Actually I never tried to use webpack so I can't give you an answer. This components bundle is configured to work with SystemJS and is also compatible with the official Angular CLI install command.
from ng2-datepicker.
@matstank can you provide example of what you did to make this work.. I am getting 404 not found from node modules. I am not using system.js I am using system.config.js provided by angular quickstart. I tried adding ng2-datepicker: npm:ng2-datepicker to that file and moment but still getting the error.
from ng2-datepicker.
@jkuri @deshazer72 @largeDachshund
I am using this date picker with webpack and it goes well if i use 1.4.x version but as soon as i update my version during webpack build i am getting this error:
ERROR in js/app.91f246157135884dd7d1.js from UglifyJs
SyntaxError: Unexpected token: punc ({) [./~/ng2-datepicker/lib-dist/ng2-datepicker.module.js:1,0]
is this problem with datepicker or i need to configure differently for webpack?
from ng2-datepicker.
Related Issues (20)
- about @hotlistener
- Automatic dropdown position feature request
- Option to not apply default input styles
- Not work with ReactiveForms
- How to clear selected date from UI? HOT 1
- ngModel null issue HOT 2
- The calendar remains opened even after the input looses focus
- Open calendar pop up on icon click event as well as input field
- Ability to keep calendar open after selecting a date
- How can i disable specific days like sunday, monday or whatever I need? HOT 1
- display month list
- Not showing dates in Saturday column on latest version of Edge on Windows HOT 2
- Locale option doesn't work with date-fns > 2
- Resetting a datepicker causes a jump, back to 1970 HOT 3
- upgrade to angular9 occurs error HOT 3
- Set value manually
- What happened to the headless attribute ? HOT 1
- Stackblitz
- Demo link taking users to malware
- Update UI when used in a reactive form.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng2-datepicker.