This repository has been archived by the owner on Aug 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 190
/
Datepicker.ui.xml
189 lines (178 loc) · 8.47 KB
/
Datepicker.ui.xml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!--
Copyright 2012 GWT-Bootstrap
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"
xmlns:b2="urn:import:com.github.gwtbootstrap.datepicker.client.ui">
<ui:style>
</ui:style>
<g:HTMLPanel>
<b:PageHeader subtext="and DateBoxes">Datepickers</b:PageHeader>
<b:FluidRow>
<b:Column size="6">
<b:Heading size="4">DataBox markup</b:Heading>
<g:HTMLPanel>
<b2:DateBox format="dd/mm/yyyy" autoClose="true" />
<p>You will need to add a new xmlns to use this.</p>
<p>
<pre class="prettyprint linenums">
xmlns:b2="urn:import:com.github.gwtbootstrap.datepicker.client.ui"
</pre>
</p>
<p>Also, don't forget to add the</p>
<p>
<pre class="prettyprint linenums">
<inherits name='com.github.gwtbootstrap.datepicker.Datepicker' />
</pre>
</p>
<p>to your GWT Module.</p>
<p>
Then, you can use it in the "b2" namespace.
</p>
<p>
<pre class="prettyprint linenums">
<b2:DateBox format="dd/mm/yyyy" autoClose="true" />
</pre>
</p>
<p>
Note that all the parameters are optional. Also, the datepicker will always try to get the user's browser language, so, usually you will not need to set a language by hand.
</p>
</g:HTMLPanel>
</b:Column>
<b:Column size="6">
<b:Heading size="4">Append style DateBox</b:Heading>
<b:Well>
<b2:DateBoxAppended/>
</b:Well>
<g:HTMLPanel>
<pre class="prettyprint linenums">
<b2:DateBoxAppended /></pre>
</g:HTMLPanel>
<b:Paragraph>
The DateBoxAppended has same attribute with DateBox.
</b:Paragraph>
<b:Well>
<b2:DateBoxAppended format="yyyy/mm/dd" autoClose="true" />
</b:Well>
<g:HTMLPanel>
<pre class="prettyprint linenums">
<b2:DateBoxAppended format="yyyy/mm/dd" autoClose="true" /></pre>
</g:HTMLPanel>
<b:Paragraph>
And DateBoxAppended can set another icon by <code>icon</code> attribute.
</b:Paragraph>
<b:Well>
<b2:DateBoxAppended format="yyyy/mm/dd" autoClose="true" icon="CALENDAR"/>
</b:Well>
<g:HTMLPanel>
<pre class="prettyprint linenums">
<b2:DateBoxAppended format="yyyy/mm/dd" autoClose="true" icon="CALENDAR"/></pre>
</g:HTMLPanel>
</b:Column>
</b:FluidRow>
<b:Heading size="4">DataBox methods and event</b:Heading>
<b:Paragraph>
<b:Code>DateBox</b:Code> has any methods and can handle show, hide and changeDate event.
Try below!
</b:Paragraph>
<b:FluidRow>
<b:Column size="6">
<b:Form type="HORIZONTAL">
<b:Fieldset>
<b:Legend>Setup popover options</b:Legend>
<b:ControlGroup>
<b:ControlLabel>Auto Close</b:ControlLabel>
<b:Controls>
<b:CheckBox ui:field="autoClose">is closed auto?</b:CheckBox>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>Format</b:ControlLabel>
<b:Controls>
<b:TextBox value="dd/mm/yyyy" ui:field="format" placeholder="input format ex:yyyy/mm/dd"/>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>Language</b:ControlLabel>
<b:Controls>
<b:TextBox value="en" ui:field="language" placeholder="input anguage ex:en"/>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>Week Start</b:ControlLabel>
<b:Controls>
<b:ListBox ui:field="weekStart">
<g:item>0</g:item>
<g:item>1</g:item>
<g:item>2</g:item>
<g:item>3</g:item>
<g:item>4</g:item>
<g:item>5</g:item>
<g:item>6</g:item>
</b:ListBox>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>Start Date</b:ControlLabel>
<b:Controls>
<b2:DateBox format="dd/mm/yyyy" ui:field="startDate"/>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>End Date</b:ControlLabel>
<b:Controls>
<b2:DateBox format="dd/mm/yyyy" ui:field="endDate"/>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>View Mode</b:ControlLabel>
<b:Controls>
<b:ValueListBox ui:field="viewMode"/>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>Enabled</b:ControlLabel>
<b:Controls>
<b:CheckBox checked="true" ui:field="enabled">Enabled</b:CheckBox>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlLabel>Value</b:ControlLabel>
<b:Controls>
<b2:DateBox format="dd/mm/yyyy" ui:field="valueDate" startView="YEAR"/>
<b:HelpBlock>If it's changed value,call below Datebox#setValue method</b:HelpBlock>
</b:Controls>
</b:ControlGroup>
</b:Fieldset>
</b:Form>
</b:Column>
<b:Column size="6">
<b:Well>
<b:Label type="INFO">Effective Datebox</b:Label>
<b2:DateBox format="dd/mm/yyyy" ui:field="datePicker"/>
<b:ButtonGroup>
<b:Button ui:field="showButton">show</b:Button>
<b:Button ui:field="hideButton">hide</b:Button>
</b:ButtonGroup>
</b:Well>
<b:Alert heading="Event log">
<g:ScrollPanel height="100px">
<g:FlowPanel ui:field="logViewer"/>
</g:ScrollPanel>
</b:Alert>
</b:Column>
</b:FluidRow>
<b:FluidRow>
</b:FluidRow>
</g:HTMLPanel>
</ui:UiBinder>