New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mat-datepicker-time-header

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mat-datepicker-time-header

default angular material datepicker header with an added time input

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-95.45%
Maintainers
1
Weekly downloads
 
Created
Source

MatDatepickerTimeHeader

Check out the Demo

Install

npm i ngx-file-drag-drop

Usage

Add the module
import { MatNativeDateModule } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatDatepickerTimeHeaderModule } from 'mat-datepicker-time-header';

@NgModule({
  imports: [
    MatNativeDateModule,
    MatDatepickerModule,
    // the module for this lib
    MatDatepickerTimeHeaderModule
  ]
})

in component.ts

Create a formGroup with a time control
form = new FormGroup({ date: new FormControl(), time: new FormControl() });
Create a referance to the MatDatepickerTimeHeaderComponent
timeHeader = MatDatepickerTimeHeaderComponent;

in component.html

Create a form and place the picker into it
<form [formGroup]="formGroup">
  <mat-form-field appearance="fill">
    <mat-label>Custom calendar header</mat-label>
    <input formControlName="date" matInput [matDatepicker]="picker" />
    <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
    <mat-datepicker #picker></mat-datepicker>
  </mat-form-field>
</form>
Add the custom heaser to the datepicker
<mat-datepicker #picker [calendarHeaderComponent]="timeHeader"></mat-datepicker>

Todo

Add option to configure time control name.

Current Limitations

No support yet for date range (no place in the header).

Keywords

FAQs

Package last updated on 26 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc