ejtimepicker knockout

Solutions on MaxInterview for ejtimepicker knockout by the best coders in the world

showing results for - "ejtimepicker knockout"
Matilda
25 Jan 2019
1<html>
2<head>
3    <title>Essential Studio for JavaScript : Timepicker Knockout</title>
4    <meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
5    <!-- Style sheet for default theme (flat azure) -->
6    <link href="http://cdn.syncfusion.com/18.1.0.42/js/web/flat-azure/ej.web.all.min.css" rel="stylesheet" />
7    <!--scripts-->
8    <script src="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></script>
9    <script src="http://cdn.syncfusion.com/js/assets/external/knockout.min.js"></script>
10    <script src="http://cdn.syncfusion.com/18.1.0.42/js/web/ej.web.all.min.js"></script>
11    <script src="http://cdn.syncfusion.com/18.1.0.42/js/common/ej.unobtrusive.min.js"></script>
12    <script src="http://cdn.syncfusion.com/18.1.0.42/js/common/ej.widget.ko.min.js"></script>
13    <!--Add custom scripts here -->
14</head>
15<body>
16    <div class="content-container-fluid">
17        <div class="row">
18            <div class="cols-sample-area">
19                <div class="frame">
20                    <div class="control" style="width: 136px;">
21                        <label style="width: 130px;">Select Show Time </label>
22                        <input id="time" type="text" data-bind="ejTimePicker:{value:timePickerValue }" />
23                    </div>
24                </div>
25            </div>
26            <div id="sampleProperties">
27                <div class="prop-grid">
28                    <div class="row">
29                        <div class="col-md-3">Time Value</div>
30                        <div class="col-md-3">
31                            <input type="text" id="timeValue" class="input ejinputtext" value="" data-bind="value: timePickerValue" />
32                        </div>
33                        <div class="col-md-3">Selected time</div>
34                        <div class="col-md-3">
35                            <input type="button" class="e-btn inputBtn" id="getTime" value="Get Time" />
36                        </div>
37                    </div>
38                </div>
39            </div>
40        </div>
41    </div>
42    <script type="text/javascript">
43        window.viewModel = {
44            //timepicker
45            timePickerValue: ko.observable("11:30 AM")
46        }
47        $(function () {
48            // declaration
49            ko.applyBindings(viewModel);
50            var timeObj = $('#time').data("ejTimePicker");
51            $("#getTime").click(function () {
52                alert("Selected time is : " + timeObj.getValue());
53            });
54            $("#sampleProperties").ejPropertiesPanel();
55        });
56    </script>
57    <style>
58        .col-md-3 {
59            padding-bottom: 5px;
60        }
61
62        .cols-sample-area {
63            width: 200px;
64            height: 80px;
65            float: left;
66        }
67    </style>
68</body>
69</html>
similar questions
datepicker