I'm working in angular project. In there users will only able to create task for today or upcoming dates using date picker.
I'm using <mat-datepicker>
with moment to disable the previous dates.
<mat-form-field formGroupName="user">
<mat-label>Due Date</mat-label>
<input
matInput
[min]="dueDateMin"
[matDatepicker]="picker"
(click)="picker.open()"
placeholder="Choose a date"
formControlName="date"
(dateChange)="setTaskDueDate($event.value); checkAvailableEfforts()"
required
/>
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-hint>Task completion date.</mat-hint>
<mat-error>Due date is required</mat-error>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
In Component
dueDateMin = moment();
Problem: User can enable the fields by change the timezone of his browser.
Question: Is there any option by which I can showing an alert on app if user will open the app in another timezone instead of mentioned timezone. for eg: "Asia/Calcutta" India Timezone.
or Use the same timezone regardless the user's machine timezone.
Thanks in advance!