![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
mat-datepicker-time-header
Advanced tools
default angular material datepicker header with an added time input
npm i mat-datepicker-time-header
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
],
entryComponents: [
// if you get an error, you may need to add the component to the entryComponents array
MatDatepickerTimeHeaderComponent
]
})
In order for the input to work, you must add a control with the name time
to a formGroup
, and add the formGroup on one of the parents of the datepicker. Otherwise it will just throw an error. The cotrol name can optionaly be configured.
in component.ts
formGroup
with a time
controlform = new FormGroup({ date: new FormControl(), time: new FormControl() });
import { MatDatepickerTimeHeaderComponent } from "mat-datepicker-time-header";
timeHeader = MatDatepickerTimeHeaderComponent;
in component.html
<form [formGroup]="form">
<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>
<mat-datepicker #picker [calendarHeaderComponent]="timeHeader"></mat-datepicker>
By default, the time input will search for a parent formGroup and attach itself to the control with the name time
,
the control name can optionaly be changed by providing the control name.
import { MAT_DATEPICKER_TIME_CONTROL_NAME } from "mat-datepicker-time-header";
providers: [
{ provide: MAT_DATEPICKER_TIME_CONTROL_NAME, useValue: "event_time" },
// now it will attach to "event_time" instead
];
Pull requests welcome
FAQs
default angular material datepicker header with an added time input
The npm package mat-datepicker-time-header receives a total of 2 weekly downloads. As such, mat-datepicker-time-header popularity was classified as not popular.
We found that mat-datepicker-time-header demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.