Skip to content

Use firestore timestamp's directly in Angular Material's datepicker

License

Notifications You must be signed in to change notification settings

alexbjorlig/material-timestamp-adapter

Repository files navigation

Material Timestamp Adapter

This is a firestore Timestamp adapter for Angular Materials date picker.

By using this adapter, you can directly display dates from firestore in the material date picker.

Use like this:

  1. npm i material-timestamp-adapter

  2. Then add the module to imports section of your NgModule:

import { MaterialTimestampAdapterModule } from 'material-timestamp-adapter';

@NgModule({
declarations: [AppComponent],
imports: [MaterialTimestampAdapterModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

TODO

  1. Refactor luxon out. Currently the library uses Luxon internally to create the adapter, and thus has Luxon as peer dependency. Would probably be better with pure JS date.
  2. Create hosted demo page

Run locally

  1. Pull the library
  2. npm i
  3. ng build material-timestamp-adapter
  4. ng s
  5. Open your browser on http://localhost:4200

About

Use firestore timestamp's directly in Angular Material's datepicker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published