{"id":13728777,"url":"https://github.com/h2qutc/ngx-mat-datetime-picker","last_synced_at":"2025-04-13T14:54:28.699Z","repository":{"id":36946015,"uuid":"232685343","full_name":"h2qutc/ngx-mat-datetime-picker","owner":"h2qutc","description":"⛔️ DEPRECATED This is no longer supported, please consider using the repository @angular-material-components/datetime-picker(https://github.com/h2qutc/angular-material-components) instead.","archived":false,"fork":false,"pushed_at":"2023-01-07T13:32:21.000Z","size":2657,"stargazers_count":32,"open_issues_count":37,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T14:54:21.235Z","etag":null,"topics":["deprecated","obselete"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h2qutc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-09T00:10:48.000Z","updated_at":"2024-01-21T09:58:35.000Z","dependencies_parsed_at":"2023-01-17T07:30:35.840Z","dependency_job_id":null,"html_url":"https://github.com/h2qutc/ngx-mat-datetime-picker","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h2qutc%2Fngx-mat-datetime-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h2qutc%2Fngx-mat-datetime-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h2qutc%2Fngx-mat-datetime-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h2qutc%2Fngx-mat-datetime-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h2qutc","download_url":"https://codeload.github.com/h2qutc/ngx-mat-datetime-picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732512,"owners_count":21152851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecated","obselete"],"created_at":"2024-08-03T02:00:50.186Z","updated_at":"2025-04-13T14:54:28.675Z","avatar_url":"https://github.com/h2qutc.png","language":"TypeScript","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=SAAY32BP5KPPC\u0026source=url"],"categories":["UI Components"],"sub_categories":["Form"],"readme":"# ⛔️ DEPRECATED \n## This is no longer supported, please consider using the repository [angular-material-components/datetime-picker](https://github.com/h2qutc/angular-material-components) instead.\n\n# Ngx Material DatetimePicker, Timepicker for @angular/material 7.x, 8.x, 9.x\n\n[![Build Status](https://travis-ci.com/h2qutc/ngx-mat-datetime-picker.svg?branch=master)](https://travis-ci.com/h2qutc/ngx-mat-datetime-picker)\n[![codecov](https://codecov.io/gh/h2qutc/ngx-mat-datetime-picker/branch/master/graph/badge.svg)](https://codecov.io/gh/h2qutc/ngx-mat-datetime-picker)\n[![License](https://img.shields.io/npm/l/ngx-mat-datetime-picker.svg)](https://www.npmjs.com/package/ngx-mat-datetime-picker)\n[![npm version](https://badge.fury.io/js/ngx-mat-datetime-picker.svg)](https://badge.fury.io/for/js/ngx-mat-datetime-picker)\n\n## Description\n\nA DatetimePicker like @angular/material [Datepicker](https://material.angular.io/components/datepicker/overview) by adding support for choosing time.\n\n[![button](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=SAAY32BP5KPPC\u0026source=url)\n\n## DEMO\n\n@see [LIVE DEMO](https://h2qutc.github.io/ngx-mat-datetime-picker/)\n\n![Alt Text](demo.png)\n\n## Getting started\n\n#### Angular 7.x, 8.x: Install the version v2.x\n\n```\nnpm install --save ngx-mat-datetime-picker@2.x\n```\n@see [DEMO stackblitz for Angular 7, Angular 8](https://stackblitz.com/edit/demo-ngx-mat-datetime-picker)\n\n#### Angular 9.x: Install the version v3.x\n\n```\nnpm install --save ngx-mat-datetime-picker@3.x\n```\n@see [DEMO stackblitz for Angular 9](https://stackblitz.com/edit/demo-ngx-mat-datetime-picker-angular9)\n\n## Setup\nBasically the same way the @angular/material Datepicker is configured and imported.\n\n```\nimport { NgxMatDatetimePickerModule, NgxMatTimepickerModule } from 'ngx-mat-datetime-picker';\n@NgModule({\n   ...\n   imports: [\n      BrowserModule,\n      HttpClientModule,\n      BrowserAnimationsModule,\n      MatDatepickerModule,\n      MatInputModule,\n      NgxMatTimepickerModule,\n      FormsModule,\n      ReactiveFormsModule,\n      MatButtonModule,\n      NgxMatDatetimePickerModule,\n   ],\n   ...\n})\nexport class AppModule { }\n```\n@see [src/app/app.module.ts](src/app/app.module.ts)\n\n## Using the component\n\nThe same API as @angular/material Datepicker (@see [API docs](https://material.angular.io/components/datepicker/api))\n\n### Datetime Picker (ngx-mat-datetime-picker)\n\n```\n\u003cmat-form-field\u003e\n   \u003cinput matInput [ngxMatDatetimePicker]=\"picker\" placeholder=\"Choose a date\" [formControl]=\"dateControl\"\n      [min]=\"minDate\" [max]=\"maxDate\" [disabled]=\"disabled\"\u003e\n   \u003cmat-datepicker-toggle matSuffix [for]=\"picker\"\u003e\u003c/mat-datepicker-toggle\u003e\n   \u003cngx-mat-datetime-picker #picker [showSpinners]=\"showSpinners\" [showSeconds]=\"showSeconds\"\n      [stepHour]=\"stepHour\" [stepMinute]=\"stepMinute\" [stepSecond]=\"stepSecond\"\u003e\n   \u003c/ngx-mat-datetime-picker\u003e\n\u003c/mat-form-field\u003e\n```\n\n### Timepicker (ngx-mat-timepicker)\n\n```\n\u003cngx-mat-timepicker [(ngModel)]=\"date\"\u003e\u003c/ngx-mat-timepicker\u003e\n\u003cngx-mat-timepicker [(ngModel)]=\"date\" [disabled]=\"disabled\"\u003e\u003c/ngx-mat-timepicker\u003e\n\u003cngx-mat-timepicker [(ngModel)]=\"date\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"10\"\u003e\u003c/ngx-mat-timepicker\u003e\n\u003cngx-mat-timepicker [(ngModel)]=\"date\" [showSpinners]=\"showSpinners\"\u003e\u003c/ngx-mat-timepicker\u003e\n\u003cngx-mat-timepicker [(ngModel)]=\"date\" [showSeconds]=\"showSeconds\"\u003e\u003c/ngx-mat-timepicker\u003e\n\u003cngx-mat-timepicker [formControl]=\"formControl\"\u003e\u003c/ngx-mat-timepicker\u003e\n```\n\n#### List of @Input\n\n| @Input        \t| Type     \t| Default value \t| Description                                                          \t|\n|---------------\t|----------\t|---------------\t|----------------------------------------------------------------------\t|\n| **disabled**      \t| boolean  \t| null          \t| If true, the picker is readonly and can't be modified                \t|\n| **showSpinners**  \t| boolean  \t| true          \t| If true, the spinners above and below input are visible              \t|\n| **showSeconds** \t| boolean  \t| true          \t| If true, it is not possible to select seconds                        \t|\n| **stepHour**      \t| number   \t| 1             \t| The number of hours to add/substract when clicking hour spinners     \t|\n| **stepMinute**    \t| number   \t| 1             \t| The number of minutes to add/substract when clicking minute spinners \t|\n| **stepSecond**    \t| number   \t| 1             \t| The number of seconds to add/substract when clicking second spinners \t|\n| **color**    \t   | ThemePalette   \t| undefined             \t| Color palette to use on the datepicker's calendar. \t|\n| **enableMeridian** | boolean   \t| false             \t| Whether to display 12H or 24H mode. \t|\n| **touchUi**    \t   | boolean   | false           | Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather than a popup and elements have more padding to allow for bigger touch targets. \t|\n\n## Choosing a date implementation and date format settings\n\nThe datepicker was built to be date implementation agnostic. This means that it can be made to work with a variety of different date implementations. However it also means that developers need to make sure to provide the appropriate pieces for the datepicker to work with their chosen implementation.\n\nThe easiest way to ensure this is to import one of the provided date modules:\n\n|                       \t| **NgxMatNativeDateModule** \t| **NgxMatMomentModule**                                                              \t|\n|-----------------------\t|----------------------------\t|-------------------------------------------------------------------------------------\t|\n| **Date type**         \t| Date                       \t| Moment                                                                              \t|\n| **Supported locales** \t| en-US                      \t| [See project for details](https://github.com/moment/moment/tree/develop/src/locale) \t|\n| **Dependencies**      \t| None                       \t| [Moment.js](https://momentjs.com/)                                                  \t|\n| **Import from**       \t| ngx-mat-datetime-picker    \t| [ngx-mat-moment-adapter](https://www.npmjs.com/package/ngx-mat-moment-adapter)      \t|\n\nTo use NgxMatMomentModule: \n   ```\n   npm install --save ngx-mat-moment-adapter\n   ```\n\nPlease note: NgxMatNativeDateModule is based off the functionality available in JavaScript's native Date object. Thus it is not suitable for many locales. One of the biggest shortcomings of the native Date object is the inability to set the parse format.\n\nWe highly recommend using the **NgxMatMomentModule** or a custom **NgxMatDateAdapter** that works with the formatting/parsing library of your choice.\n\nFor example:\n\nCreating a custom date adapter:\n\n```\n@Injectable()\nexport class CustomDateAdapter extends NgxMatDateAdapter\u003cD\u003e {...}\n// D can be Date, Moment or customized type\n```\n\nCreating a custom date adapter module\n```\n@NgModule({\n  providers: [\n    {\n      provide: NgxMatDateAdapter,\n      useClass: CustomDateAdapter,\n      deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]\n    }\n  ],\n})\nexport class CustomDateModule { }\n```\n\n\n## Theming\n- @see @angular/material [Using a pre-built theme](https://material.angular.io/guide/theming#using-a-pre-built-theme)\n- Add the Material Design icon font to your index.html\n```\n\u003clink href=\"https://fonts.googleapis.com/icon?family=Material+Icons\u0026display=block\" rel=\"stylesheet\"\u003e\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh2qutc%2Fngx-mat-datetime-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh2qutc%2Fngx-mat-datetime-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh2qutc%2Fngx-mat-datetime-picker/lists"}