I can find plenty of datetime pickers for AngularJS but no reliable (working) ones for Angular. Is there any Angular datetime picker that works, that someone here has used?
-
Have you tried UI bootstrap calender this works for both. AngularJS And AngularJS 2. U need to modified youe code little bit. for reference refer this link: plnkr.co/edit/ZGl0VuJjVF1nliMidaL6?p=previe.Yasin– Yasin2016-08-11 07:13:14 +00:00Commented Aug 11, 2016 at 7:13
-
@Yasin is there anyway to add time picker for this calendar ?Rodrigo– Rodrigo2017-05-21 15:47:26 +00:00Commented May 21, 2017 at 15:47
-
I have added into 1 datetime picker component github.com/Gillardo/ngx-bootstrap-datetime-popupGillardo– Gillardo2017-07-26 11:01:16 +00:00Commented Jul 26, 2017 at 11:01
Add a comment
|
3 Answers
Try Calendar control from primeNG. This gives you any format of date & time.
Sample implementation looks like below-
Update package.json
"primeng": "^1.0.0-beta.7", "primeui": "^4.1.10",
component lines are-
import { Calendar } from 'primeng/primeng';
directives: [Calendar]
p-calendar [(ngModel)]="date1" dateFormat="mm/dd/yy" timeFormat="HH:mm">
You can find more format examples on - http://www.primefaces.org/primeng/#/calendar
6 Comments
Phoenix Dev
Is it free to use in production?
Sanket
All PrimeNG widgets are open source and free to use under MIT License.
Phoenix Dev
Ok thanks! I updated the package json and on running npm update it gave an error like: npm ERR! shasum check failed for /tmp/npm-4892-b82ffbcf/registry.npmjs.org/primeui/-/primeui-4.1.15.tgz.
Sanket
Can you please raise a new question with all your details?
Phoenix Dev
Ok sure! I'll do it.
|
Not sure if this helps, but i have made a basic popup component using the ngx-bootstrap datepicker and timepicker. You can find it here
2 Comments
Aravindh Gopi
can you please add a demo?
Gillardo
This has been updated today and working on ng-cli, webpack etc with angular 4+
I haven't used these libraries yet but both may help you:
Give them a try and let us know if they work correctly for Angular 2.
2 Comments
developer747
Ive already tried both. If you get their source code from github as is and try npm install and npm run, neither one works. mydatepicker fails in npm run and ng2-datepicker throws a javascrippt error and fails.
miquelarranz
It's difficult to find libraries working since Angular 2 is still under development. If you use Chrome and an input of type date, a calendar button is shown and it works like datepicker, but only works on Chrome I guess.