We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Angular 16, if the current date and time are not being preselected when opening the DateTime Picker
The text was updated successfully, but these errors were encountered:
Hi @kar7189 ,
Its duplicate thread of #356
Anyway added solution here as well.
I am using Angular 17.
In polyfills.ts file, Add the below mentioned code.
import { NgxMatTimepickerComponent } from '@angular-material-components/datetime-picker'; NgxMatTimepickerComponent.prototype.writeValue = function (val: any): void { if (val != null) { this._model = val; } else { this._model = this._dateAdapter.today(); if (this.defaultTime != null) { this._dateAdapter.setTimeByDefaultValues(this._model, this.defaultTime); } } this._updateHourMinuteSecond(); setTimeout(() => { this.form.updateValueAndValidity(); }); }
Sorry, something went wrong.
No branches or pull requests
In Angular 16, if the current date and time are not being preselected when opening the DateTime Picker
The text was updated successfully, but these errors were encountered: