forked from syncfusion/ej2-aspnetcore-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimePickerFor.cshtml
75 lines (65 loc) · 2.3 KB
/
TimePickerFor.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@using Syncfusion.EJ2
@*@model directive allows you to access the model values*@
@model EJ2CoreSampleBrowser.Controllers.TimeValue
@section ControlsSection{
<div class=" control-section">
<div class="timepicker-section">
<div id="wrapper" class="timepicker-control">
<div class="tabs-wrap">
<div class="wrap">
<form method="post">
<ejs-timepicker id="timepicker" name="value" ejs-for="@Model.value"></ejs-timepicker>
<div id="errorMessage">
<span asp-validation-for="value"></span>
</div>
<div id="submitbutton">
<ejs-button id="submitButton" content="Submit"></ejs-button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
}
@*custom code start*@
<style>
#wrapper {
max-width: 246px;
margin: 30px auto;
padding-top: 20px;
}
.tabs-wrap {
padding: 0 0px 10px;
}
.e-bigger .control-section {
margin-top: 60px;
}
#submitbutton {
margin: 10px auto;
text-align: center;
}
#errorMessage {
color: red;
text-align: center
}
</style>
@*custom code end*@
@section ActionDescription{
<div id="action-description">
<p>
Click/Touch the submit button to post the selected value in the TimePicker. When posting the null value, validation error message will be shown below the TimePicker.
</p>
</div>
}
@section Description{
<div id="description">
<p>
This sample demonstrates the strongly typed extension support in TimePicker. Value is set as model object to the TimePicker from the code behind, and its set to TimePicker in view page by invoking the strongly typed TimePickerFor helper with the lamba expression.
</p>
<p>
More information about the TimePicker and it's configuration can be found in the
<a href="https://ej2.syncfusion.com/aspnetcore/documentation/timepicker/getting-started-core/" target="_blank"> documentation section</a>.
</p>
</div>
}