Comments (6)
Hi,
Did you try that ?
@ViewChild('startDate',{static: false}) public startDatePicker: NgxMatDatetimePicker<any>;
@ViewChild('endDate',{static: false}) public endDatePicker: NgxMatDatetimePicker<any>;
The type of picker is NgxMatDatetimePicker, not MatDatepicker.
from angular-material-components.
Hi, when I'm trying to add NgxMatDatetimePicker, I receive: "Cannot find name 'NgxMatDatetimePicker'", which is quite strange because I'm using it in this class of FormComponent.
Inside my app.module I've got:
import { NgxMatDatetimePickerModule, NgxMatTimepickerModule } from 'ngx-mat-datetime-picker';
from angular-material-components.
If you can provide an example stackblitz.com, then it will be useful 😄.
Can you try that:
@ViewChild('startDate',{static: false}) public startDatePicker: any;
@ViewChild('endDate',{static: false}) public endDatePicker: any;
from angular-material-components.
This way it goes "ERROR TypeError: Cannot read property 'close' of undefine". I'll try to reproduce it on stackblitz.com. Thank you.
from angular-material-components.
At https://stackblitz.com/edit/demo-ngx-mat-datetime-picker demo, I've tried to add (click)="picker.open()"
to the first input
<input matInput [ngxMatDatetimePicker]="picker" placeholder="Choose a date" [formControl]="dateControl" [min]="minDate" [max]="maxDate" [disabled]="disabled" (click)="picker.open()">
and it does not work. Maybe it's connected somehow ?
from angular-material-components.
Alright, it works this way:
@ViewChild('startDate') public startDatePicker: MatDatepicker<any>;
@ViewChild('endDate') public endDatePicker: MatDatepicker<any>;
this.startDatePicker.close();
from angular-material-components.
Related Issues (20)
- Date time picker style not loading initially.. but works after opening normal material date picker Angular 16 HOT 25
- [Angular 15] check button issue HOT 2
- query regarding startview of year
- [Angular 15] datetime-picker issue on iOS17
- 'ngx-mat-datepicker-actions' is not a known element
- Internationalization issue - first day of week
- custom action button not working
- Cannot use datetime-picker with Angular 15 and Angular Material 14
- Angular 17 compatibility HOT 14
- [Angular 16] Angular 16.2.1. breaks the styling of the datetimepicker component HOT 2
- more than 2 datetime picker in one page which is load dynamically & Not able to change the format
- [Angular 10] Keyboard navigation broken
- About the ngx-matdate-time-picker
- Switching between the years is very slow on the date picker version 8 HOT 3
- Spinner icons are not loading HOT 2
- Optional HEX Color Input field
- want to have keyboard toggle in dates HOT 1
- ngx-mat-datetime-picker is improperly formatted in angular 16 HOT 3
- Datepicker design breaks Angular 13 HOT 2
- angular upgrade V16 to V17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-material-components.