Angular datetime picker?
18,944
Solution 1
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
Solution 2
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
Related videos on Youtube
Author by
developer747
"Abstractions save us time working, but they don't save us time learning."-Joel Spolsky
Updated on September 14, 2022Comments
-
developer747 over 1 year
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?
-
developer747 almost 8 yearsIve 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 almost 8 yearsIt'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.
-
Phoenix Dev almost 7 yearsIs it free to use in production?
-
Sanket almost 7 yearsAll PrimeNG widgets are open source and free to use under MIT License.
-
Phoenix Dev almost 7 yearsOk 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 almost 7 yearsCan you please raise a new question with all your details?
-
Phoenix Dev almost 7 yearsOk sure! I'll do it.
-
Phoenix Dev almost 7 yearsI got it to work but design is broken. Can you help! I have raised a question: stackoverflow.com/questions/44536981/…
-
Aravindh Gopi over 6 yearscan you please add a demo?
-
Gillardo over 6 yearsThis has been updated today and working on ng-cli, webpack etc with angular 4+