diff --git a/ej2-asp-core-mvc/datepicker/EJ2_ASP.MVC/timezone-behavior.md b/ej2-asp-core-mvc/datepicker/EJ2_ASP.MVC/timezone-behavior.md index 3a10b9370d..9effedceeb 100644 --- a/ej2-asp-core-mvc/datepicker/EJ2_ASP.MVC/timezone-behavior.md +++ b/ej2-asp-core-mvc/datepicker/EJ2_ASP.MVC/timezone-behavior.md @@ -14,12 +14,10 @@ The DatePicker component displays and maintains the selected date value based on N> if the system time zone is changed dynamically after a value is selected, the DatePicker will **not update or shift** the selected value. The component preserves the original selection, ensuring a stable and reliable user experience. -## Using `serverTimezoneOffset` +## `serverTimezoneOffset` The `serverTimezoneOffset` property allows you to specify the server's time zone offset from UTC in **hours** or **fractional hours**. This is useful when binding values from the server to ensure they are interpreted correctly on the client side. -### Key Points - - The value should be a number representing the offset from UTC. - Examples: - `-5` → UTC-5 (Eastern Standard Time) diff --git a/ej2-asp-core-mvc/datepicker/EJ2_ASP.NETCORE/timezone-behavior.md b/ej2-asp-core-mvc/datepicker/EJ2_ASP.NETCORE/timezone-behavior.md new file mode 100644 index 0000000000..9effedceeb --- /dev/null +++ b/ej2-asp-core-mvc/datepicker/EJ2_ASP.NETCORE/timezone-behavior.md @@ -0,0 +1,41 @@ +--- +layout: post +title: Timezone Behavior in ##Platform_Name## Datepicker | Syncfusion +description: Learn here all about Timezone Behavior in Syncfusion ##Platform_Name## Datepicker component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: Timezone Behavior +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# Timezone Behavior in DatePicker Control + +The DatePicker component displays and maintains the selected date value based on the client system’s current time zone. When a user selects a value, it is stored and rendered using the local time zone of the system at the time of selection. This ensures that the value remains consistent and predictable during user interaction. + +N> if the system time zone is changed dynamically after a value is selected, the DatePicker will **not update or shift** the selected value. The component preserves the original selection, ensuring a stable and reliable user experience. + +## `serverTimezoneOffset` + +The `serverTimezoneOffset` property allows you to specify the server's time zone offset from UTC in **hours** or **fractional hours**. This is useful when binding values from the server to ensure they are interpreted correctly on the client side. + +- The value should be a number representing the offset from UTC. +- Examples: + - `-5` → UTC-5 (Eastern Standard Time) + - `-4.5` → UTC-4:30 (Afghanistan Time) + - `5.5` → UTC+5:30 (India Standard Time) + +N> The `serverTimezoneOffset` property is applicable **only for pre-bound values** (i.e., values set during initialization or data binding). It does **not affect** values selected by the user during runtime. + +### Example + +```ts +import { DatePicker } from '@syncfusion/ej2-calendars'; + +/* Initialize the DatePicker component */ +let datepicker: DatePicker = new DatePicker({ + placeholder: "Select Date", + width: "250px", + serverTimezoneOffset: 5.5 // Example: UTC+5:30 for IST +}); + +datepicker.appendTo('#datepicker'); diff --git a/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.MVC/timezone-behavior.md b/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.MVC/timezone-behavior.md index 116ae25611..e41385de28 100644 --- a/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.MVC/timezone-behavior.md +++ b/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.MVC/timezone-behavior.md @@ -14,12 +14,10 @@ The DateTimePicker component displays and maintains the selected date and time v N> if the system time zone is changed dynamically after a value is selected, the DateTimePicker will **not update or shift** the selected value. The component preserves the original selection, ensuring a stable and reliable user experience. -## Using `serverTimezoneOffset` +## `serverTimezoneOffset` The `serverTimezoneOffset` property allows you to specify the server's time zone offset from UTC in **hours** or **fractional hours**. This is useful when binding values from the server to ensure they are interpreted correctly on the client side. -### Key Points - - The value should be a number representing the offset from UTC. - Examples: - `-5` → UTC-5 (Eastern Standard Time) diff --git a/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.NETCORE/timezone-behavior.md b/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.NETCORE/timezone-behavior.md new file mode 100644 index 0000000000..0dd0647856 --- /dev/null +++ b/ej2-asp-core-mvc/datetimepicker/EJ2_ASP.NETCORE/timezone-behavior.md @@ -0,0 +1,41 @@ +--- +layout: post +title: Timezone Behavior in ##Platform_Name## Datetimepicker | Syncfusion +description: Learn here all about Timezone Behavior in Syncfusion ##Platform_Name## Datetimepicker component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: Timezone Behavior +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# Timezone Behavior in DateTimePicker Control + +The DateTimePicker component displays and maintains the selected date and time value based on the client system’s current time zone. When a user selects a value, it is stored and rendered using the local time zone of the system at the time of selection. This ensures that the value remains consistent and predictable during user interaction. + +N> if the system time zone is changed dynamically after a value is selected, the DateTimePicker will **not update or shift** the selected value. The component preserves the original selection, ensuring a stable and reliable user experience. + +## `serverTimezoneOffset` + +The `serverTimezoneOffset` property allows you to specify the server's time zone offset from UTC in **hours** or **fractional hours**. This is useful when binding values from the server to ensure they are interpreted correctly on the client side. + +- The value should be a number representing the offset from UTC. +- Examples: + - `-5` → UTC-5 (Eastern Standard Time) + - `-4.5` → UTC-4:30 (Afghanistan Time) + - `5.5` → UTC+5:30 (India Standard Time) + +N> The `serverTimezoneOffset` property is applicable **only for pre-bound values** (i.e., values set during initialization or data binding). It does **not affect** values selected by the user during runtime. + +### Example + +```ts +import { DateTimePicker } from '@syncfusion/ej2-calendars'; + +/* Initialize the DateTimePicker component */ +let datetimepicker: DateTimePicker = new DateTimePicker({ + placeholder: "Select Date Time", + width: "250px", + serverTimezoneOffset: 5.5 // Example: UTC+5:30 for IST +}); + +datetimepicker.appendTo('#datetimepicker'); \ No newline at end of file diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 7c52317101..83e018cf15 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -797,6 +797,7 @@
  • Start and Depth View
  • Accessibility
  • Style and Appearance
  • +
  • Timezone Behavior
  • How To