You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.
the issue while translating from english language to german language the value inside the input field is not translating into german language.am using sat-datepicker.we are using the angular 7 version.Any help
Files>>>>>>>>>>>>
component.html>>>
@output() deviceInfo = new EventEmitter();
rangeValue = {
begin: new Date(),
end: new Date(),
};
minDate: Date;
maxDate: Date;
device: Device;
constructor() { }
ngOnChanges(changes: SimpleChanges) {
if (changes) {
if (changes.dateRange) {
this.rangeValue = {
begin: changes.dateRange.currentValue.startDate,
end: changes.dateRange.currentValue.endDate
};
}
}
}
ngOnInit() {
this.initializeMinMaxDate();
}
initializeMinMaxDate() {
const previousDate = new Date();
const currentDate = new Date();
// End date is included in the count hence subtracting 30 only
previousDate.setDate(previousDate.getDate() - 30);
this.minDate = new Date(previousDate.getFullYear(), previousDate.getMonth(), previousDate.getDate());
this.maxDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
}
the issue while translating from english language to german language the value inside the input field is not translating into german language.am using sat-datepicker.we are using the angular 7 version.Any help
Files>>>>>>>>>>>>
component.html>>>
component.ts >>>>>
import {
Component,
Input,
Output,
EventEmitter,
OnChanges,
SimpleChanges,
OnInit
} from '@angular/core';
import { Device } from 'src/app/dashboard/models';
import { DateRange } from 'src/app/home/select-duration/models';
import { IDeviceRange } from './device-range';
@component({
selector: 'app-device-range',
templateUrl: './device-range.component.html',
styleUrls: ['./device-range.component.scss']
})
export class DeviceRangeComponent implements OnChanges, OnInit {
@input() devices: Device[] = [];
@input() selectedDevice: string;
@input() setDateSelectorResponsiveView: boolean;
@input() dateRange: DateRange = {
startDate: new Date(),
endDate: new Date(),
};
@output() deviceInfo = new EventEmitter();
rangeValue = {
begin: new Date(),
end: new Date(),
};
minDate: Date;
maxDate: Date;
device: Device;
constructor() { }
ngOnChanges(changes: SimpleChanges) {
if (changes) {
if (changes.dateRange) {
this.rangeValue = {
begin: changes.dateRange.currentValue.startDate,
end: changes.dateRange.currentValue.endDate
};
}
}
}
ngOnInit() {
this.initializeMinMaxDate();
}
initializeMinMaxDate() {
const previousDate = new Date();
const currentDate = new Date();
// End date is included in the count hence subtracting 30 only
previousDate.setDate(previousDate.getDate() - 30);
this.minDate = new Date(previousDate.getFullYear(), previousDate.getMonth(), previousDate.getDate());
this.maxDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
}
dateRangeChange(event) {
this.dateRange = {
startDate: event.value.begin,
endDate: event.value.end,
};
this.onDeviceChange();
}
The text was updated successfully, but these errors were encountered: