Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142847 | Feb 21,2019 11:29 PM UTC | Feb 23,2019 04:53 AM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Calendar |
export class DefaultDateTimePickerComponent {
@ViewChild('datetime') public datetimeObj: DateTimePickerComponent; onCreate(args) { let a = new Date("1/1/2019 10:00 PM"); // get UTC time in msec
let utc = a.getTime() + (a.getTimezoneOffset() * 60000); // using CST offset and assign the value to the DateTimePicker // -6 is offset of CST time zone
this.datetimeObj.value = new Date(utc + (3600000 * -6));
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.