Skip to content

Commit 17ef714

Browse files
966391: Updated Asp.net UG Documentation
1 parent 59c380f commit 17ef714

File tree

12 files changed

+116
-40
lines changed

12 files changed

+116
-40
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@{
2+
var serverTimezoneOffset = 5.5;
3+
var initialDate = new Date();
4+
}
5+
6+
@Html.EJS().DatePicker("datepicker")
7+
.ServerTimezoneOffset(serverTimezoneOffset)
8+
.Value(initialDate)
9+
.Render()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
@{
3+
var serverTimezoneOffset = 5.5;
4+
var initialDate = new Date();
5+
}
6+
7+
<ejs-datetimepicker id="datetimepicker" value="intialDate" serverOffset="serverTimezoneOffset"></ejs-datetimepicker>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace EJ2CoreSampleBrowser.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public ActionResult Datepicker()
12+
{
13+
ViewBag.serverTimezoneOffset=5.5;
14+
ViewBag.initalDate=new Date();
15+
return View();
16+
}
17+
}
18+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@{
2+
var serverTimezoneOffset = 5.5;
3+
var initialDate = new Date();
4+
}
5+
6+
@Html.EJS().DateTimePicker("datetimepicker")
7+
.ServerTimezoneOffset(serverTimezoneOffset)
8+
.Value(initialDate)
9+
.Render()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
@{
3+
var serverTimezoneOffset = 5.5;
4+
var initialDate = new Date();
5+
}
6+
7+
<ejs-datetimepicker id="datetimepicker" value="intialDate" serverOffset="serverTimezoneOffset"></ejs-datetimepicker>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace EJ2CoreSampleBrowser.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public ActionResult DateTimepicker()
12+
{
13+
ViewBag.serverTimezoneOffset=5.5;
14+
ViewBag.initalDate=new Date();
15+
return View();
16+
}
17+
}
18+
}

ej2-asp-core-mvc/datepicker/EJ2_ASP.MVC/timezone-behavior.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ The `serverTimezoneOffset` property allows you to specify the server's time zone
2626

2727
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.
2828

29-
### Example
29+
{% if page.publishingplatform == "aspnet-core" %}
3030

31-
```ts
32-
import { DatePicker } from '@syncfusion/ej2-calendars';
31+
{% tabs %}
32+
{% highlight cshtml tabtitle="CSHTML" %}
33+
{% include code-snippet/datepicker/timezone-cs1/tagHelper %}
34+
{% endhighlight %}{% endtabs %}
3335

34-
/* Initialize the DatePicker component */
35-
let datepicker: DatePicker = new DatePicker({
36-
placeholder: "Select Date",
37-
width: "250px",
38-
serverTimezoneOffset: 5.5 // Example: UTC+5:30 for IST
39-
});
36+
{% elsif page.publishingplatform == "aspnet-mvc" %}
4037

41-
datepicker.appendTo('#datepicker');
38+
{% tabs %}
39+
{% highlight razor tabtitle="CSHTML" %}
40+
{% include code-snippet/datepicker/timezone-cs1/razor %}
41+
{% endhighlight %}{% endtabs %}
42+
{% endif %}

ej2-asp-core-mvc/datepicker/EJ2_ASP.NETCORE/timezone-behavior.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ The `serverTimezoneOffset` property allows you to specify the server's time zone
2626

2727
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.
2828

29-
### Example
29+
{% if page.publishingplatform == "aspnet-core" %}
3030

31-
```ts
32-
import { DatePicker } from '@syncfusion/ej2-calendars';
31+
{% tabs %}
32+
{% highlight cshtml tabtitle="CSHTML" %}
33+
{% include code-snippet/datepicker/timezone-cs1/tagHelper %}
34+
{% endhighlight %}{% endtabs %}
3335

34-
/* Initialize the DatePicker component */
35-
let datepicker: DatePicker = new DatePicker({
36-
placeholder: "Select Date",
37-
width: "250px",
38-
serverTimezoneOffset: 5.5 // Example: UTC+5:30 for IST
39-
});
36+
{% elsif page.publishingplatform == "aspnet-mvc" %}
4037

41-
datepicker.appendTo('#datepicker');
38+
{% tabs %}
39+
{% highlight razor tabtitle="CSHTML" %}
40+
{% include code-snippet/datepicker/timezone-cs1/razor %}
41+
{% endhighlight %}{% endtabs %}
42+
{% endif %}

ej2-asp-core-mvc/datetimepicker/EJ2_ASP.MVC/timezone-behavior.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ The `serverTimezoneOffset` property allows you to specify the server's time zone
2626

2727
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.
2828

29-
### Example
29+
{% if page.publishingplatform == "aspnet-core" %}
3030

31-
```ts
32-
import { DateTimePicker } from '@syncfusion/ej2-calendars';
31+
{% tabs %}
32+
{% highlight cshtml tabtitle="CSHTML" %}
33+
{% include code-snippet/datetimepicker/timezone-cs1/tagHelper %}
34+
{% endhighlight %}{% endtabs %}
3335

34-
/* Initialize the DateTimePicker component */
35-
let datetimepicker: DateTimePicker = new DateTimePicker({
36-
placeholder: "Select Date Time",
37-
width: "250px",
38-
serverTimezoneOffset: 5.5 // Example: UTC+5:30 for IST
39-
});
36+
{% elsif page.publishingplatform == "aspnet-mvc" %}
4037

41-
datetimepicker.appendTo('#datetimepicker');
38+
{% tabs %}
39+
{% highlight razor tabtitle="CSHTML" %}
40+
{% include code-snippet/datetimepicker/timezone-cs1/razor %}
41+
{% endhighlight %}{% endtabs %}
42+
{% endif %}

ej2-asp-core-mvc/datetimepicker/EJ2_ASP.NETCORE/timezone-behavior.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ The `serverTimezoneOffset` property allows you to specify the server's time zone
2626

2727
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.
2828

29-
### Example
29+
{% if page.publishingplatform == "aspnet-core" %}
3030

31-
```ts
32-
import { DateTimePicker } from '@syncfusion/ej2-calendars';
31+
{% tabs %}
32+
{% highlight cshtml tabtitle="CSHTML" %}
33+
{% include code-snippet/datetimepicker/timezone-cs1/tagHelper %}
34+
{% endhighlight %}{% endtabs %}
3335

34-
/* Initialize the DateTimePicker component */
35-
let datetimepicker: DateTimePicker = new DateTimePicker({
36-
placeholder: "Select Date Time",
37-
width: "250px",
38-
serverTimezoneOffset: 5.5 // Example: UTC+5:30 for IST
39-
});
36+
{% elsif page.publishingplatform == "aspnet-mvc" %}
4037

41-
datetimepicker.appendTo('#datetimepicker');
38+
{% tabs %}
39+
{% highlight razor tabtitle="CSHTML" %}
40+
{% include code-snippet/datetimepicker/timezone-cs1/razor %}
41+
{% endhighlight %}{% endtabs %}
42+
{% endif %}

0 commit comments

Comments
 (0)