5

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?

3
  • 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. Commented Aug 11, 2016 at 7:13
  • @Yasin is there anyway to add time picker for this calendar ? Commented May 21, 2017 at 15:47
  • I have added into 1 datetime picker component github.com/Gillardo/ngx-bootstrap-datetime-popup Commented Jul 26, 2017 at 11:01

3 Answers 3

2

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

Sign up to request clarification or add additional context in comments.

6 Comments

Is it free to use in production?
All PrimeNG widgets are open source and free to use under MIT License.
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.
Can you please raise a new question with all your details?
Ok sure! I'll do it.
|
1

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

https://github.com/Gillardo/ngx-bootstrap-datetime-popup

2 Comments

can you please add a demo?
This has been updated today and working on ng-cli, webpack etc with angular 4+
-1

I haven't used these libraries yet but both may help you:

mydatepicker

ng2-datepicker

Give them a try and let us know if they work correctly for Angular 2.

2 Comments

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.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.