0

Is there a datepicker which we can use with Angular 2 RC1

I can see ng2-datepicker is using angular2 RC1 but while installing it's looking for Angular 2 Beta.

Any Help.

Thanks in Advance

Arun Tyagi
  • 2,206
  • 5
  • 24
  • 37

2 Answers2

1

Have a look here, using angular2 RC.1

https://github.com/MrPardeep/Angular2-DatePicker

enter image description here

see also :

Community
  • 1
  • 1
Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
  • Hey Thanks for this, But there is nothing about How to install I tried this "npm install Angular2-Bootflat-DatePicker" and "npm install Angular2-DatePicker " Both doesn't works – Arun Tyagi Jun 08 '16 at 06:22
  • hey @ArunTyagi just fork/clone the repo, go inside the Angular2 datepicker folder, where your `package.json` exist, run command `npm install` than run command `gulp` . – Pardeep Jain Jun 08 '16 at 06:24
  • or you can see `Getting Started` section of repo on github there, if found something amazing in datepicker just give start to motivate me ;-) – Pardeep Jain Jun 08 '16 at 06:26
  • can't we install it as we install other plugin from npm ? – Arun Tyagi Jun 08 '16 at 06:27
  • yeah you can just you have to run `npm install` as other repo's – Pardeep Jain Jun 08 '16 at 06:30
1

Try Calendar control from primeNG. This gives you any format of date & time.

Sample implementation looks like below-

  1. Update package.json

    "primeng": "^1.0.0-beta.7", "primeui": "^4.1.10",

  2. import Calendar from primeNG

    import { Calendar } from 'primeng/primeng';

  3. Declare it in directives

    directives: [Calendar]

  4. Use it in Component template

p-calendar [(ngModel)]="date1" dateFormat="mm/dd/yy" timeFormat="HH:mm">

You can find more format examples on - http://www.primefaces.org/primeng/#/calendar

Sanket
  • 19,295
  • 10
  • 71
  • 82