1 | <!doctype html> |
---|
2 | <html lang="en"> |
---|
3 | <head> |
---|
4 | <title>Knockout - Multiple Widgets</title> |
---|
5 | <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" /> |
---|
6 | <link href="../../themes/wijmo/jquery.wijmo-open.2.2.2.css" rel="stylesheet" type="text/css" /> |
---|
7 | <script src="../../external/jquery-1.8.0.min.js" type="text/javascript"></script> |
---|
8 | <script src="../../external/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script> |
---|
9 | <script src="../../external/jquery.wijmo-open.all.2.2.2.min.js" type="text/javascript"></script> |
---|
10 | <link href="../../themes/wijmo/jquery.wijmo.wijinput.css" rel="stylesheet" type="text/css" /> |
---|
11 | <script src="../../external/globalize.min.js" type="text/javascript"></script> |
---|
12 | <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script> |
---|
13 | <script src="../../wijmo/jquery.plugin.wijtextselection.js" type="text/javascript"></script> |
---|
14 | <script src="../../wijmo/jquery.wijmo.wijinputcore.js" type="text/javascript"></script> |
---|
15 | <script src="../../wijmo/jquery.wijmo.wijinputdate.js" type="text/javascript"></script> |
---|
16 | <script src="../../../../Wijmo-Open/development-bundle/external/knockout-2.0.0.js" |
---|
17 | type="text/javascript"></script> |
---|
18 | <script src="../../../../Wijmo-Open/development-bundle/external/knockout.wijmo.js" |
---|
19 | type="text/javascript"></script> |
---|
20 | <script type="text/javascript"> |
---|
21 | //Create ViewModel |
---|
22 | var viewModel = function () { |
---|
23 | var self = this; |
---|
24 | self.val = ko.observable(new Date('1/1/2012')); |
---|
25 | self.disabled = ko.observable(false); |
---|
26 | }; |
---|
27 | |
---|
28 | //Bind ViewModel |
---|
29 | $(document).ready(function () { |
---|
30 | var vm = new viewModel(); |
---|
31 | ko.applyBindings(vm, $(".container").get(0)); |
---|
32 | }); |
---|
33 | </script> |
---|
34 | </head> |
---|
35 | <body class="demo-single"> |
---|
36 | <div class="container"> |
---|
37 | <div class="header"> |
---|
38 | <h2> |
---|
39 | Input Date</h2> |
---|
40 | </div> |
---|
41 | <div class="main demo"> |
---|
42 | <!-- Begin demo markup --> |
---|
43 | <p> |
---|
44 | Input:</p> |
---|
45 | <input data-bind="wijinputdate: { date: val, disabled: disabled }" /> |
---|
46 | <!-- End demo markup --> |
---|
47 | <div class="demo-options"> |
---|
48 | <!-- Begin options markup --> |
---|
49 | <ul> |
---|
50 | <li> |
---|
51 | <label> |
---|
52 | <span>disabled:</span></label><input type="checkbox" data-bind="checked: disabled" /> |
---|
53 | </li> |
---|
54 | <li> |
---|
55 | <label> |
---|
56 | <span>value:</span></label><input type="text" data-bind="value: val" /> |
---|
57 | </li> |
---|
58 | </ul> |
---|
59 | <!-- End options markup --> |
---|
60 | </div> |
---|
61 | </div> |
---|
62 | <div class="footer demo-description"> |
---|
63 | <p> |
---|
64 | Wijmo provides a Knockout Integration Library so that all jQuery UI and Wijmo widgets |
---|
65 | can be used with Knockout declarative syntax. |
---|
66 | </p> |
---|
67 | </div> |
---|
68 | </div> |
---|
69 | </body> |
---|
70 | </html> |
---|