cirandas.net

ref: master

public/javascripts/vendor/jquery-timepicker-addon/src/docs/options.html


  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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!-- ############################################################################# -->
<!-- Options
<!-- ############################################################################# -->
<div id="tp-options">
	<h2>Options</h2>

	<p>The timepicker does inherit all options from datepicker.  However, there are many options that are shared by them both, and many timepicker only options:</p>

	<h3>Localization Options</h3>
	<dl class="defs">
		<dt>currentText</dt>
			<dd><em>Default: "Now", A Localization Setting</em> - Text for the Now button.</dd>

		<dt>closeText</dt>
			<dd><em>Default: "Done", A Localization Setting</em> - Text for the Close button.</dd>

		<dt>amNames</dt>
			<dd><em>Default: ['AM', 'A'], A Localization Setting</em> - Array of strings to try and parse against to determine AM.</dd>

		<dt>pmNames</dt>
			<dd><em>Default: ['PM', 'P'], A Localization Setting</em> - Array of strings to try and parse against to determine PM.</dd>

		<dt>timeFormat</dt>
			<dd><em>Default: "HH:mm", A Localization Setting</em> - String of format tokens to be replaced with the time. <a href="#tp-formatting" title="Formatting" onclick="$('#tabs').tabs('select',2);">See Formatting</a>.</dd>

		<dt>timeSuffix</dt>
			<dd><em>Default: "", A Localization Setting</em> - String to place after the formatted time.</dd>

		<dt>timeOnlyTitle</dt>
			<dd><em>Default: "Choose Time", A Localization Setting</em> - Title of the wigit when using only timepicker.</dd>

		<dt>timeText</dt>
			<dd><em>Default: "Time", A Localization Setting</em> - Label used within timepicker for the formatted time.</dd>

		<dt>hourText</dt>
			<dd><em>Default: "Hour", A Localization Setting</em> - Label used to identify the hour slider.</dd>

		<dt>minuteText</dt>
			<dd><em>Default: "Minute", A Localization Setting</em> - Label used to identify the minute slider.</dd>

		<dt>secondText</dt>
			<dd><em>Default: "Second", A Localization Setting</em> - Label used to identify the second slider.</dd>

		<dt>millisecText</dt>
			<dd><em>Default: "Millisecond", A Localization Setting</em> - Label used to identify the millisecond slider.</dd>

		<dt>microsecText</dt>
			<dd><em>Default: "Microsecond", A Localization Setting</em> - Label used to identify the microsecond slider.</dd>

		<dt>timezoneText</dt>
			<dd><em>Default: "Timezone", A Localization Setting</em> - Label used to identify the timezone slider.</dd>

		<dt>isRTL</dt>
			<dd><em>Default: false, A Localization Setting</em> - Right to Left support.</dd>
	</dl>

	<h3>Alt Field Options</h3>
	<dl class="defs">

		<dt>altFieldTimeOnly</dt>
			<dd><em>Default: true</em> - When altField is used from datepicker altField will only receive the formatted time and the original field only receives date.</dd>

		<dt>altSeparator</dt>
			<dd><em>Default: (separator option)</em> - String placed between formatted date and formatted time in the altField.</dd>

		<dt>altTimeSuffix</dt>
			<dd><em>Default: (timeSuffix option)</em> - String always placed after the formatted time in the altField.</dd>

		<dt>altTimeFormat</dt>
			<dd><em>Default: (timeFormat option)</em> - The time format to use with the altField.</dd>
	</dl>

	<h3>Timezone Options</h3>
	<dl class="defs">

		<dt>timezoneList</dt>
			<dd><em>Default: [generated timezones]</em> - An array of timezones used to populate the timezone select. Can be an array of values or an array of objects: { label: "EDT", value: -240 }.  The value should be the offset number in minutes.  So "-0400" which is the format "-hhmm", would equate to -240 minutes.</dd>
	</dl>

	<h3>Time Field Options</h3>
	<dl class="defs">

		<dt>controlType</dt>
			<dd><em>Default: 'slider'</em> - Whether to use 'slider' or 'select'. If 'slider' is unavailable through jQueryUI, 'select' will be used. For advanced usage you may pass an object which implements "create", "options", "value" methods to use controls other than sliders or selects.  See the _controls property in the source code for more details.
<pre>{
	create: function(tp_inst, obj, unit, val, min, max, step){	
		// generate whatever controls you want here, just return obj
	},
	options: function(tp_inst, obj, unit, opts, val){
		// if val==undefined return the value, else return obj
	},
	value: function(tp_inst, obj, unit, val){
		// if val==undefined return the value, else return obj
	}
}</pre>
			</dd>

		<dt>showHour</dt>
			<dd><em>Default: null</em> - Whether to show the hour control.  The default of null will use detection from timeFormat.</dd>

		<dt>showMinute</dt>
			<dd><em>Default: null</em> - Whether to show the minute control.  The default of null will use detection from timeFormat.</dd>

		<dt>showSecond</dt>
			<dd><em>Default: null</em> - Whether to show the second control.  The default of null will use detection from timeFormat.</dd>

		<dt>showMillisec</dt>
			<dd><em>Default: null</em> - Whether to show the millisecond control.  The default of null will use detection from timeFormat.</dd>

		<dt>showMicrosec</dt>
			<dd><em>Default: null</em> - Whether to show the microsecond control.  The default of null will use detection from timeFormat.</dd>

		<dt>showTimezone</dt>
			<dd><em>Default: null</em> - Whether to show the timezone select.</dd>

		<dt>showTime</dt>
			<dd><em>Default: true</em> - Whether to show the time selected within the datetimepicker.</dd>

		<dt>stepHour</dt>
			<dd><em>Default: 1</em> - Hours per step the slider makes.</dd>

		<dt>stepMinute</dt>
			<dd><em>Default: 1</em> - Minutes per step the slider makes.</dd>

		<dt>stepSecond</dt>
			<dd><em>Default: 1</em> - Seconds per step the slider makes.</dd>

		<dt>stepMillisec</dt>
			<dd><em>Default: 1</em> - Milliseconds per step the slider makes.</dd>

		<dt>stepMicrosec</dt>
			<dd><em>Default: 1</em> - Microseconds per step the slider makes.</dd>

		<dt>hour</dt>
			<dd><em>Default: 0</em> - Initial hour set.</dd>

		<dt>minute</dt>
			<dd><em>Default: 0</em> - Initial minute set.</dd>

		<dt>second</dt>
			<dd><em>Default: 0</em> - Initial second set.</dd>

		<dt>millisec</dt>
			<dd><em>Default: 0</em> - Initial millisecond set.</dd>

		<dt>microsec</dt>
			<dd><em>Default: 0</em> - Initial microsecond set.  Note: Javascript's native Date object does not natively support microseconds.  Timepicker adds ability to simply Date.setMicroseconds(m) and Date.getMicroseconds().  Date comparisons will not acknowledge microseconds.  Use this only for display purposes.</dd>

		<dt>timezone</dt>
			<dd><em>Default: null</em> - Initial timezone set.  This is the offset in minutes.  If null the browser's local timezone will be used.  If you're timezone is "-0400" you would use -240.  For backwards compatibility you may pass "-0400", however the timezone is stored in minutes and more reliable.</dd>

		<dt>hourMin</dt>
			<dd><em>Default: 0</em> - The minimum hour allowed for all dates.</dd>

		<dt>minuteMin</dt>
			<dd><em>Default: 0</em> - The minimum minute allowed for all dates.</dd>

		<dt>secondMin</dt>
			<dd><em>Default: 0</em> - The minimum second allowed for all dates.</dd>

		<dt>millisecMin</dt>
			<dd><em>Default: 0</em> - The minimum millisecond allowed for all dates.</dd>

		<dt>microsecMin</dt>
			<dd><em>Default: 0</em> - The minimum microsecond allowed for all dates.</dd>

		<dt>hourMax</dt>
			<dd><em>Default: 23</em> - The maximum hour allowed for all dates.</dd>

		<dt>minuteMax</dt>
			<dd><em>Default: 59</em> - The maximum minute allowed for all dates.</dd>

		<dt>secondMax</dt>
			<dd><em>Default: 59</em> - The maximum second allowed for all dates.</dd>

		<dt>millisecMax</dt>
			<dd><em>Default: 999</em> - The maximum millisecond allowed for all dates.</dd>

		<dt>microsecMax</dt>
			<dd><em>Default: 999</em> - The maximum microsecond allowed for all dates.</dd>

		<dt>hourGrid</dt>
			<dd><em>Default: 0</em> - When greater than 0 a label grid will be generated under the slider.  This number represents the units (in hours) between labels.</dd>

		<dt>minuteGrid</dt>
			<dd><em>Default: 0</em> - When greater than 0 a label grid will be generated under the slider.  This number represents the units (in minutes) between labels.</dd>

		<dt>secondGrid</dt>
			<dd><em>Default: 0</em> - When greater than 0 a label grid will be genereated under the slider.  This number represents the units (in seconds) between labels.</dd>

		<dt>millisecGrid</dt>
			<dd><em>Default: 0</em> - When greater than 0 a label grid will be genereated under the slider.  This number represents the units (in milliseconds) between labels.</dd>

		<dt>microsecGrid</dt>
			<dd><em>Default: 0</em> - When greater than 0 a label grid will be genereated under the slider.  This number represents the units (in microseconds) between labels.</dd>
	</dl>

	<h3>Other Options</h3>
	<dl class="defs">
		<dt>showButtonPanel</dt>
			<dd><em>Default: true</em> - Whether to show the button panel at the bottom.  This is generally needed.</dd>

		<dt>timeOnly</dt>
			<dd><em>Default: false</em> - Hide the datepicker and only provide a time interface.</dd>

		<dt>timeOnlyShowDate</dt>
			<dd><em>Default: false</em> - Show the date and time in the input, but only allow the timepicker.</dd>

		<dt>onSelect</dt>
			<dd><em>Default: null</em> - Function to be called when a date is chosen or time has changed (parameters: datetimeText, datepickerInstance).</dd>

		<dt>alwaysSetTime</dt>
			<dd><em>Default: true</em> - Always have a time set internally, even before user has chosen one.</dd>

		<dt>separator</dt>
			<dd><em>Default: " "</em> - When formatting the time this string is placed between the formatted date and formatted time.</dd>

		<dt>pickerTimeFormat</dt>
			<dd><em>Default: (timeFormat option)</em> - How to format the time displayed within the timepicker.</dd>
		
		<dt>pickerTimeSuffix</dt>
			<dd><em>Default: (timeSuffix option)</em> - String to place after the formatted time within the timepicker.</dd>

		<dt>showTimepicker</dt>
			<dd><em>Default: true</em> - Whether to show the timepicker within the datepicker.</dd>

		<dt>addSliderAccess</dt>
			<dd><em>Default: false</em> - Adds the <a href="http://trentrichardson.com/examples/jQuery-SliderAccess/" title="jQueryUI Slider Access Plugin">sliderAccess plugin</a> to sliders within timepicker</dd>

		<dt>sliderAccessArgs</dt>
			<dd><em>Default: null</em> - Object to pass to sliderAccess when used.</dd>

		<dt>defaultValue</dt>
			<dd><em>Default: null</em> - String of the default time value placed in the input on focus when the input is empty.</dd>

		<dt>minDateTime</dt>
			<dd><em>Default: null</em> - Date object of the minimum datetime allowed.  Also available as minDate.</dd>

		<dt>maxDateTime</dt>
			<dd><em>Default: null</em> - Date object of the maximum datetime allowed. Also Available as maxDate.</dd>

		<dt>minTime</dt>
			<dd><em>Default: null</em> - String of the minimum time allowed. '8:00 am' will restrict to times after 8am</dd>

		<dt>maxTime</dt>
			<dd><em>Default: null</em> - String of the maximum time allowed. '8:00 pm' will restrict to times before 8pm</dd>

		<dt>parse</dt>
			<dd><em>Default: 'strict'</em> - How to parse the time string.  Two methods are provided: 'strict' which must match the timeFormat exactly, and 'loose' which uses javascript's new Date(timeString) to guess the time.  You may also pass in a function(timeFormat, timeString, options) to handle the parsing yourself, returning a simple object: 
<pre>{
	hour: 19,
	minute: 10,
	second: 23,
	millisec: 45,
	microsec: 23,
	timezone: '-0400'
}</pre>
			</dd>
	</dl>

</div>