Questions tagged [mat-datepicker]

Angular Material Date picker allows users to enter a date either through text input, or by choosing a date from the calendar. It is made up of several components and directives that work together.

Angular Material Date picker allows users to enter a date either through text input, or by choosing a date from the calendar. It is made up of several components and directives that work together.

128 questions
0
votes
1 answer

Datepicker and timepicker validation

I have an event which has start date and time, end date and time. I have used angular material date picker and NGX time-picker. I have done validation for date picker only so how I can provide validation based on the conditions.
0
votes
1 answer

how to set the date format in mat date picker in angular

I had a form that consists of a form-control as date picker with a mat date picker. when I select the date using the date picket the form control is taking a date class. I need to convert it into string. Kindly help me in this html…
sandeep v
  • 43
  • 9
0
votes
1 answer

Angular mat-datepicker weird behavior

I have the following HTML code for datepicker :
Nathan Cheval
  • 773
  • 2
  • 7
  • 32
0
votes
1 answer

Mat date picker custom value in Angular getting error

I am working on Mat date picker custom value. Here is my code which I am trying
Mr.M
  • 1,472
  • 3
  • 29
  • 76
0
votes
1 answer

matDatepicker inside *ngFor issue

Don't know how to name the click function so it picks up which matdatepicker was clicked. Right now, whenever I update one date it also updates the other.
0
votes
4 answers

Change mat-datepicker selected date value according to a time zone

In ts. I have used a (dateChange)="setToDate($event.value)" to get selected date.
R0b1n
  • 513
  • 1
  • 5
  • 28
0
votes
0 answers

how to change mat-datepicker input on click button?

I am trying to bind date property to mat-datepicker's input when im click on nextDate button. how can I do it? I am using [(ngModel)] but it not working. my html code
0
votes
1 answer

how to show only current year in mat-datepicker

I'm using angular material datepicker.But in that datepicker I want o show only current year .. any idea how do I do that ? You can refer the provided link https://material.angular.io/components/datepicker/overview
Priyanka
  • 370
  • 1
  • 6
  • 15
0
votes
1 answer

how to set custom (dd-mm-yyyy) date value in Angular Material date picker while submitting form

When i set value in Angular Material date picker it shows correct date format as i desire like dd-mm-yyyy but when i submit the form it shows entire date object like - Mon Oct 07 2019 00:00:00 GMT+0530 (India Standard Time) i want it to be…
0
votes
1 answer

Add mat-datepicker on mat-input conditionally

I would like to add a material date picker conditionally but without duplicating my input tag. For example, if i have this : .ts : isDatePickerInputList: boolean[] = [false, true] The easy way would be to have 2 input in a *ngFor : the first…
Gauthier T.
  • 556
  • 1
  • 4
  • 16
0
votes
0 answers

Getting server error ( status:500) while using date pickers in Angular with back-end in ASP.NET core web API

I am using Angular when using datepicker I get this error: HttpErrorResponse {headers: HttpHeaders, status: 500, statusText: "Internal Server Error", url: "http://localhost:53626/api/Customer", ok: false, …}error: "…
0
votes
1 answer

Cannot get ngForm date value from datepicker in angular

I can not get value from mat-datepicker. It says undefined. I used ngForm and ngModel but I do not know where I am wrong.